goCtrl: one ad tag for every ad format

goCtrl is GoAdserver’s ad tag controller: the small JavaScript that runs on a publisher’s website and turns ad zone codes into ads. Load it once per site, add one line per ad zone, and it handles every ad format, lazy loading, ad blockers and single-page apps.

On a white-label network it runs under your own variable name and from your own ad-serving domain, so publishers only ever see your brand. Here is what it does.

eaCTRL ad control script

What goCtrl does

One script per website:

Load the controller once in the site template. Each ad zone then needs one short add() call, and all zones on a page go out in one batched request.

Every ad format:

The controller picks the right plugin for each zone type: banner, native, native bar, web push, pop, tabs, full page, interstitial, floater, video slider, in-page video, in-video, reels, video carousel, creator widget, skin and footer code.

Lazy loading:

With lazy loading on, an ad is only requested when its zone scrolls into view, which keeps pages fast and avoids paying for ads nobody saw.

Built for single-page apps:

pause() and resume() stop and restart ad activity around your own modals or route changes, and onReady() runs your code once the controller is ready.

Ad blocker detection:

onAbDetected() tells you when a visitor uses an ad blocker, and an optional modal can ask them to allow ads. With anti-adblock on, a self-hosted controller sends its requests through a path on your own domain, so block lists that target known ad domains don’t catch them.

Hosted or self-hosted:

Load it from your ad domain, or download a ZIP with the controller, the proxy script, the ad-blocker modal and a test page, and serve it as a first-party file from your own site.

Visitor analytics built in:

Switch on visitor analytics for a website and the same controller counts pageviews and your own events, including route changes in single-page apps, without a second script.

Video player integration:

In-video zones run inside your own player, such as video.js, JW Player, KT Player or Flowplayer.

Sub-IDs and keywords:

Add a sub-ID to any zone to split it in your statistics, and keywords for contextual targeting where the network has it switched on.

Fast pages first

An ad tag that slows the page costs more than it earns: visitors leave and search rankings drop. goCtrl is built to stay out of the way.

  • Small: the core controller is about 11 KB compressed.
  • One request per page: every ad zone registers with the same controller, which fetches their ads together in one batched request instead of one call per slot.
  • Cached plugins: each ad format is a separate plugin the browser keeps, and it is only sent again when a new version ships.
  • Lazy loading: zones further down the page are only requested when they scroll into view.
  • Loaded once: ten ad zones on a page still download the controller once; repeated tags are ignored.

Ads that reach ad-block users

Block lists work by recognising known ad scripts, domains and paths. goCtrl gives them far less to recognise:

  • Self-host the controller and serve it as a first-party file from your own site.
  • Route its requests through a path on your own domain (a PHP proxy script, an nginx or Apache rule, a CNAME or a CDN rule), and pick a path that doesn’t look like ads.
  • Give the controller a variable name of your own.
  • onAbDetected() tells your page when a visitor still blocks ads, and an optional modal can ask them to allow ads.

Made for single-page apps

Single-page apps built with React, Vue, Angular or Next.js change the page without reloading it, which breaks most ad tags. goCtrl has calls for exactly that: pause() and resume() around route changes and your own modals, onReady() to run your code once the controller is up, and visitor analytics that counts each route change as a pageview.

What the code looks like

One tag in the <head> of your site template:

<script src="https://your-ad-domain/ctrl/your-controller-id.js"></script>

Then one line where each ad should appear:

<div id="id_11708551"></div>
<script>goCtrl.add({"display":"id_11708551","sid":11708551,"plugin":"banner"});</script>

The panel generates both on each ad zone’s Code tab, with your real domain and ids filled in. No build step, no SDK, no framework.

How to install goCtrl

  1. Add your website and create its ad zones in the publisher panel.
  2. Copy the controller tag from Publisher → Ads Controller and put it once in the <head> of your site template.
  3. Paste each zone’s add() call where the ad should appear; the code is on the zone’s Code tab.
  4. Optional: switch on lazy loading, anti-adblock with a proxy path on your own domain (a PHP script, an nginx or Apache rule, a CNAME or a CDN rule), and visitor analytics.

Who uses goCtrl

Every publisher on a GoAdserver network, and every ad manager serving ads on their own sites. Ad networks get it white-labelled for all their publishers. goCtrl serves all the ad formats and the SmartZones of GoAdserver’s ad management, and it is the first step to monetising your website.

Frequently asked questions

What is goCtrl?

goCtrl is the JavaScript ad tag controller of the GoAdserver ad server. Publishers load it once per website, and it requests and renders the ads for every ad zone on the page.

Will goCtrl slow down my website?

It is built not to. The core is about 11 KB compressed, all ad zones on a page share one batched request, format plugins stay cached in the browser, and lazy loading only requests ads that scroll into view.

Does goCtrl work with ad blockers?

It detects them. With anti-adblock switched on, a self-hosted controller sends its requests through a path on your own domain, which lists that block known ad domains don’t catch. No method beats every blocker, so goCtrl also tells your page when a visitor still blocks ads.

Can I use goCtrl in a single-page app?

Yes. pause(), resume() and onReady() let React, Vue, Angular or Next.js apps control ads around route changes, and visitor analytics counts each route change as a pageview.

Which ad formats does goCtrl support?

All GoAdserver ad formats: banner, native, native bar, web push, pop, tabs, full page, interstitial, floater, video slider, in-page video, in-video, reels, video carousel, creator widget, skin and footer code.

Is goCtrl white-label?

Yes. On a white-label ad network every controller runs under your variable name and from your ad-serving domain, so your publishers never see GoAdserver.

Do I need a developer to install it?

No. Copy the controller tag into your site template once and paste each ad zone’s code where the ad goes. Developers find every option in the Ad Controller reference of the documentation.

Documentation

Set it up step by step in the GoAdserver documentation: the Ad Controller reference and Getting your ad code.