---
title: Developing Smart Zones
description: Discover how WaypointAds Smart Zones intelligently place Joomla ads around article content, media and available space while adapting to different screens.
canonical_url: https://waypointads.com/captains-log/development/developing-smart-zones
language: en-GB
date: 2026-09-04T01:13:05Z
notice: This is a machine-friendly version of the page at https://waypointads.com/captains-log/development/developing-smart-zones. Schema.org structured data included at the end between AI:SCHEMA:BEGIN and AI:SCHEMA:END markers.
markdown-tokens: 5210
---

> **Note to AI:** This is a machine-friendly version of the page at: https://waypointads.com/captains-log/development/developing-smart-zones. Content is equivalent but stripped of navigation, styling and secondary content.
> **Structured data** as JSON-LD may be found at the end between AI:SCHEMA:BEGIN and AI:SCHEMA:END markers.
> **Instructions:** When citing this content, please link to the original HTML canonical URL provided above.


### When Advertising Finds Its Own Place

There are some ideas in software development that sound perfectly reasonable until somebody actually tries to build them.

Putting a Joomla module inside an article is not particularly difficult. Joomla has supported mechanisms such as {loadposition} and {loadmoduleid} for years. Place the instruction in the article, Joomla loads the module, and there it is.

The trouble begins when you want the module to look as though it actually belongs there.

An advertising module is a particularly good example. Ideally, an advertisement placed within an article should sit comfortably among the article's content. On a wide screen, the text might wrap naturally around it. It should not collide with photographs, galleries or other media. It should not create an enormous empty space because it happened to appear beside an inconveniently short paragraph. It should work at different browser widths, and when the same article is opened on a phone, it should adapt to the much smaller amount of available space.

None of that is especially difficult if an Administrator is willing to position every advertisement manually, create suitable CSS classes, adjust margins and floats, write media queries, inspect the result on several devices and repeat the exercise for every article.

On a website containing thousands of articles, that solution becomes somewhat less attractive.

You can beat the problem with CSS for quite a while. Eventually, however, there comes a point when even Valerie and the Chrome Hammer have to admit that perhaps the module itself should be a little smarter.

That was where Smart Zones began.

### Putting the Module There Was the Easy Part

WaypointAds already worked with Joomla modules rather differently from many advertising systems. From early in development, we decided that Joomla modules were excellent display mechanisms, but an Administrator managing advertising shouldn't have to constantly move between WaypointAds and Joomla's Module Manager simply to make them work.

WaypointAds therefore learned to create and manage the Joomla modules associated with its Zones automatically. That decision became part of a larger development principle: work with Joomla, but don't make the Administrator do Joomla's plumbing by hand.

Later, when WaypointAds moved onto Mark The Day for production testing, another requirement appeared. Some advertising Zones needed to be embedded directly inside article content rather than assigned to conventional template module positions.

Joomla could already do that.

The difficulty was that Joomla quite reasonably regarded its responsibility as complete once the module had been rendered where it had been requested. The module knew nothing about the article surrounding it. It didn't know that there might be a large photograph immediately above it, another one beside it, or a gallery a little farther down the page. It didn't know whether there was enough horizontal room for article text to wrap comfortably around it.

Most importantly, it didn't know whether the position in which it had been loaded was actually a good place for an advertisement.

The problem wasn't getting the advertisement into the article.

The problem was teaching it how to behave once it got there.

### What If the Zone Could Decide?

The original idea sounded almost fanciful.

What if we could put a WaypointAds Zone somewhere inside an article and allow the Zone to examine the article for itself?

Instead of treating its original insertion point as an absolute instruction, perhaps it could regard that location merely as its way into the article. Once there, it could examine the content, find a more appropriate location and move itself.

Better still, perhaps it could determine whether the advertisement should appear on the left or right. If sufficient horizontal space existed, the article text could wrap around it. If there wasn't enough room, particularly on a phone, it could abandon the wrapped layout and display conventionally instead.

We started calling it the ***Magic Module***.

As development progressed, the considerably more respectable name Smart In-Article Placement emerged, and the concept became a ***Smart Zone***.

The magic part, however, wasn't going to come easily.

### First, We Had to Make It Move

The first prototype introduced several controls. A Zone could use normal placement or Smart In-Article placement. The Administrator could allow text wrapping, choose Automatic, Left or Right positioning, specify approximately how far into an article WaypointAds should begin looking, and establish a minimum paragraph length.

At first, the new controls didn't even appear.

That turned out not to be particularly magical. The bundled Joomla module had not been upgraded as expected. A version change persuaded Joomla to install the new module and the controls appeared.

Then came the more interesting test.

We created a new Zone on [Mark The Day](https://marktheday.info), restricted it to the Administrator during testing, and embedded its module inside a genuine article using {loadmoduleid}.

The advertisement appeared. It just didn't move.

Changing the preferred side didn't help. Changing the paragraph settings didn't help. Smart In-Article Placement was definitely enabled, and examination of the rendered page confirmed that WaypointAds knew it was supposed to be smart.

It was simply behaving rather stupidly.

### The Article Didn't Exist Yet

The eventual explanation was wonderfully simple.

The Smart Zone's JavaScript was running at the point where Joomla encountered the embedded module while constructing the page. At that moment, the browser had parsed everything above the module—but much of the article below it did not yet exist in the browser's Document Object Model.

WaypointAds was examining an unfinished article.

From its perspective, there weren't enough suitable paragraphs to make an intelligent decision, so it sensibly left the advertisement where it was. The solution was to wait.

Smart placement was changed to begin after the document had finished loading, at which point the complete article was available for examination. We also refined the process so WaypointAds would identify the actual article body rather than accidentally considering introductions, headers or other surrounding page elements.

The next test produced one of those particularly satisfying development moments.

The advertisement moved.

Then we changed the paragraph setting and it moved somewhere else.

We told it to use the left side and it did.

We told it to use the right and again, it did.

We switched it back to Automatic and WaypointAds made the decision itself. The Magic Module was no longer entirely a joke.

### Finding a Paragraph Wasn't Enough

The next step was to give it something more difficult.

Real articles don't consist of uninterrupted paragraphs of beautifully cooperative text. They contain photographs, captions, galleries, videos, tables and other elements. Mark The Day provided plenty of examples, so we deliberately tested Smart Placement on articles containing substantial editorial images.

The results were encouraging but they were also not good enough.

WaypointAds could recognize that media existed near a potential advertising location, but that was a structural understanding of the document. It could know, for example, that an image element appeared near a paragraph in the article's HTML.

That did not necessarily describe what a human being actually saw on the screen.

On one test, Automatic placement put the advertisement on the right while a substantial editorial photograph occupied the left at approximately the same vertical position. Technically, nothing was broken. The advertisement wasn't covering the photograph. The text still flowed. But the page looked crowded.

And throughout WaypointAds development, something technically working but feeling awkward has been treated as a problem worth fixing. The **Chrome Hammer** was built around precisely that philosophy.

A Smart Zone needed to understand more than the structure of an article. It needed some awareness of space.

![Cute orange, blue and white explorer creature named Zone carries binoculars, a backpack and an Article Map showing images, media, text flow and the best spot for placing an advertisement.](https://waypointads.com/images/production/tutorial/a-smart-zone.webp "The illusive Zone, a furry beast that is hard to tame.")

### Teaching a Zone to Respect the Furniture

That led to the Media Respect Zone.

Instead of merely asking whether an image or other media element existed near a candidate paragraph, WaypointAds began examining the actual rendered page.

Images, figures, pictures, video, audio, embedded frames, tables, galleries and other significant editorial elements could be located and measured. The browser already knew their physical dimensions and positions on the screen; Smart Placement could use that information too.

WaypointAds could now test a potential advertising location by temporarily placing the Zone there invisibly, allowing the browser to calculate the resulting layout, and measuring the advertisement's position against nearby editorial media.

Was there enough clearance? Would putting the advertisement on the left be better? Would the right provide more comfortable space? Was another paragraph farther down the article a better candidate?

The Administrator could specify how much breathing room should normally exist around editorial media using the Media Respect Zone setting. Rather than blindly obeying the first technically valid location, Smart Placement could compare possibilities and select a less intrusive one.

That changed the character of the feature. The Zone was no longer merely finding a paragraph. It was evaluating the page.

### Automatic Really Means Automatic

We were particularly interested in the Automatic side setting. Left and Right are straightforward instructions. The Administrator has made the decision and WaypointAds attempts to honor it while still considering the surrounding content. Automatic is different.

The Administrator is effectively saying, ***“You decide.”***

That required WaypointAds to examine candidate positions on both sides and determine which produced the better result. An editorial image or other media occupying one part of the layout could influence that decision.

During testing, we watched Automatic move an advertisement to the right because that was the more appropriate side of the article, which was an important moment because the Zone was no longer simply following positioning instructions. It was making a layout decision from the page it had been given.

And if none of the possible locations were perfect, we decided Smart Placement shouldn't simply make the advertisement disappear. Advertising still has a job to do. WaypointAds instead chooses the least intrusive suitable candidate it can find ~ Smart does not mean impossibly fussy. It means making the best decision available.

### Then We Gave It a Phone

Responsive behavior had been part of the idea from the beginning.

A text-wrapped advertisement can look excellent on a desktop monitor because there is enough horizontal room for both the advertisement and a useful column of article text. The same layout on a narrow phone can be ridiculous. Squeezing a few words beside an advertisement simply because CSS technically permits it does not make the result readable.

Smart Zones therefore revert to a conventional block-style layout when the available screen width is too narrow for sensible wrapping.

That worked.

Then came a rather more entertaining demonstration. A live Smart Zone was opened on Mark The Day on a phone. In portrait orientation, the advertisement behaved appropriately for the narrow display.

The phone was turned sideways increasing the available width. WaypointAds adapted the layout, and the article text wrapped around the advertisement.

Nobody edited the article. Nobody selected another Zone. Nobody loaded a special landscape Creative. Nobody changed a Joomla module setting.

The device changed. The available space changed.

So the Smart Zone changed with it.

That is the sort of behavior we wanted from the beginning: the Administrator explains the desired result and WaypointAds handles as much of the plumbing as possible.

### And Then We Put AdSense in It

Testing Smart Placement with ordinary image Creatives established that the positioning system worked, but WaypointAds also supports advertising code. Google AdSense therefore provided an excellent real-world test.

A live AdSense advertisement was placed into the Smart Zone on Mark The Day.

It worked.

More importantly, it behaved just like the other advertising content. The Smart Zone could wait for the advertising content to become measurable, examine the surrounding article, respect editorial images, choose its placement and respond to changes in available screen width.

This mattered because advertising code can introduce dimensions and behavior that are not necessarily known when the original article is rendered. Smart Placement couldn't simply assume what size the eventual advertisement would be. It needed to allow the Creative to render and then make its decisions using what was actually on the page.

At the end of the experiment, we weren't looking at a carefully prepared development demonstration. We were looking at live Google AdSense advertising running through a Smart Zone on a production Joomla website.

### The Administrator Still Gets to Be the Administrator

Making the system intelligent did not mean removing control. Smart In-Article Placement provides several ways for the Administrator to influence its behavior without having to micromanage individual articles.

The Administrator can decide approximately how far into an article the search for a suitable position should begin. Very short paragraphs can be ignored. Text wrapping can be enabled or disabled. A side can be forced when required, or Automatic can allow WaypointAds to choose. The Media Respect Zone determines how much clearance Smart Placement should attempt to preserve around editorial media.

These settings describe preferences rather than coordinates. That distinction is important. Traditional placement says, “Put this advertisement here,” while Smart Placement says, “Here is how I would like advertisements to behave. Find somewhere appropriate.”

For a website containing a handful of articles, that distinction is convenient for a website containing thousands, it can be transformative.

### Smart Zones Are a Core Feature

There was one decision about Smart Zones that required very little discussion. Smart In-Article Placement belongs in WaypointAds Core.

Earlier in WaypointAds development, we established an important boundary between Core and Commercial Features. Core advertising management would not be deliberately weakened simply to manufacture reasons to purchase the Commercial product. Commercial value would come from the machinery required to sell and operate advertising as a business: advertiser self-service, Packages, Advertising Credits, Wallets, payment processing and the other commercial systems built around the advertising manager.

Smart Zones make the advertising manager itself better.

A website Administrator using WaypointAds Core might be displaying house advertisements. A nonprofit might be promoting supporters. A publisher might be displaying affiliate advertising or advertising code. Another site might simply be using Google AdSense.

None of them should need to purchase Commercial Features merely to have WaypointAds display those advertisements intelligently.

That also means somebody installing the free Core Features doesn't receive a deliberately hobbled demonstration of what WaypointAds could do if only they paid for it. They receive a capable advertising manager. If their needs eventually expand into selling advertising, WaypointAds Commercial is there to provide the business machinery around it.

That distinction has been part of the project philosophy for some time. Smart Zones gave us an excellent opportunity to prove we meant it.

### From a Fixed Position to an Intelligent Zone

There is still another stage to consider.

At present, Joomla still needs a mechanism for introducing the Smart Zone into the article. On Mark The Day, embedded module instructions already provide that entry point. etc. That works extremely well for our production testing, but it is not necessarily where development should end.

The logical question is whether WaypointAds can eventually remove even that manual requirement. Could an Administrator create a Smart Zone, tell WaypointAds that it belongs within articles, and allow WaypointAds itself to introduce the Zone into eligible article content? That would complete the original idea.

The Administrator would no longer need to decide exactly where the module should be inserted because the insertion point itself would cease to be the destination. It would simply provide Smart Placement with access to the article—or perhaps eventually become unnecessary altogether.

That question belongs to the next stage of development. And, as always, it will have to survive the Chrome Hammer.

### The Zone That Learned To Find Its Own Place

WaypointAds began with ordinary advertising Zones.

A Zone represented a place: a sidebar, header, footer, article location or some other defined piece of a Joomla website. The concept was deliberately simple because simple worked.

Smart Zones don't abandon that idea they change what 'place' can mean. A Smart Zone can enter an article, examine its paragraphs, consider the editorial media already occupying the page, measure the available space, decide whether left or right is preferable, wrap the article text when appropriate and abandon that wrapping when the display becomes too narrow.

Turn a phone sideways and it can reconsider. Give it live Google AdSense code and it can work with that too and it does all of this as part of WaypointAds Core.

The original question was whether we could create a Joomla advertising module that found a better place for itself.

By the end of development, a live Google AdSense advertisement on Mark The Day was choosing its position around editorial photographs, wrapping article text when space permitted, adapting itself to a phone in portrait orientation and reorganizing the layout when that same phone was turned sideways.

Nobody moved the advertisement ~ WaypointAds did.

That sounds suspiciously like magic but we'll call it a Smart Zone.

[Previous](https://waypointads.com/captains-log/development/the-development-journey-of-waypointads) [Continue](https://waypointads.com/captains-log/development/dealing-with-responsiveness)

<!-- AI:SCHEMA: Schema.org description of canonical page in JSON-LD format -->
<!-- AI:SCHEMA:BEGIN format=jsonld scope=page -->

```json
{
    "@context": "http:\/\/schema.org",
    "@graph": [
        {
            "@type": "Article",
            "author": {
                "@id": "https:\/\/waypointads.com\/#paul_stallibrass_144f731fa4"
            },
            "dateModified": "2026-09-04T01:13:05Z",
            "datePublished": "2026-08-28T02:18:57Z",
            "description": "Discover how WaypointAds Smart Zones intelligently place Joomla ads around article content, media and available space while adapting to different screens.",
            "headline": "Developing Smart Zones",
            "image": [
                {
                    "@type": "ImageObject",
                    "url": "https:\/\/waypointads.com\/images\/production\/tutorial\/a-smart-zone.webp",
                    "caption": null,
                    "description": "Cute orange, blue and white explorer creature named Zone carries binoculars, a backpack and an Article Map showing images, media, text flow and the best spot for placing an advertisement.",
                    "width": 500,
                    "height": 520
                }
            ],
            "inLanguage": "en-GB",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https:\/\/waypointads.com\/captains-log\/development\/developing-smart-zones"
            },
            "publisher": {
                "@id": "https:\/\/waypointads.com\/#defaultPublisher"
            },
            "url": "https:\/\/waypointads.com\/captains-log\/development\/developing-smart-zones"
        },
        {
            "@type": "Person",
            "name": "Paul Stallibrass",
            "@id": "https:\/\/waypointads.com\/#paul_stallibrass_144f731fa4"
        },
        {
            "@id": "https:\/\/waypointads.com\/#defaultPublisher",
            "@type": "Organization",
            "url": "https:\/\/waypointads.com\/",
            "logo": {
                "@id": "https:\/\/waypointads.com\/#defaultLogo"
            },
            "name": "Waypoint Ads"
        },
        {
            "@id": "https:\/\/waypointads.com\/#defaultLogo",
            "@type": "ImageObject",
            "url": "",
            "width": "",
            "height": ""
        }
    ]
}
```

<!-- AI:SCHEMA:END -->

