Static Tag

Static tags are simple scripts that create a single ad placement in the same location the <script> tag itself sits. They can be loaded many times per page, even with the same ID. The URL should not be modified before placement, and there is no need for a cachebuster.

A static tag looks like this:

<!-- Begin Neuwo Ad -->
<script type="text/javascript" src="//ads.neuwo.ai/loader/neuwo-ad.js?staticTagId=STATICTAGID"></script>
<!-- End Neuwo Ad -->

STATICTAGID is issued by Neuwo: contact Neuwo or email adops@neuwo.ai to get one.

Placement

Static tags create ads exactly where they are placed. They belong in the <body> block, somewhere visible to the reader and not obscured by another element.

Static compared with dynamic

The dynamic script is lighter and faster, and is the preferred method. Static tags exist for compatibility, or for when the top frame of a page is not accessible.

Injection

Static tags are normally supplied as HTML snippets that should be rendered in the body along with the rest of the page. If one is injected from an ad server, that server has to be able to write executable HTML to the page, using document.write or some other method. Scripts inserted by an ad server have to be executable.

Injecting by running a JavaScript snippet is also possible:

(function(doc, target) {
var s = doc.createElement("script");
s.src = "//ads.neuwo.ai/loader/neuwo-ad.js?staticTagId=STATICTAGID";
target.parentElement.insertBefore(s, target.nextElementSibling);
})(window.document, targetElement);

Here targetElement is the element the static tag is inserted after.

Embedding in HTML compared with ad server injection

Always embed static tags in the rendered HTML of the page if you can. Using an ad server's containers results in blank ad placements when there is no fill: Neuwo placements, the static tag included, close and clean up automatically when there is no demand, but an outer container generated by an ad server will not close and leaves unwanted blank space behind.

If an ad server is unavoidable, use no containers on the ad server side, so the static tag is simply injected into the body.