Use IAB's HTML5 clickTag Standard on AppNexus
Follow these instructions to use the IAB's clickTag standard in HTML5 creatives hosted with AppNexus. This allows AppNexus to track clicks and set the ad's landing page to the URL provided in Console.
You will require a text editor to complete the procedure below. If you do not have one, we recommend Sublime Text.
Do not hardcode landing page URLs for your creative. This will be set in Console when the assets are uploaded.
Step 1: Add the AppNexus HTML5 Library
Add the AppNexus HTML5 Library inside the
<head> tag in the
index.html file, by adding the following
Use https to ensure the creative can serve on secure inventory.
Step 2: Add
to a clickable element
Wrap the banner markup in an HTML element that opens a new window and uses the
APPNEXUS.getClickTag() function. This will retrieve the value of the clickTag parameter set in the ad URL. The example below uses the <a> anchor element with the
href attribute set to
onClick attribute set to
<body> and be sure to close it with
</a> immediately before
</body>. The banner markup should go between
Step 3: Test
Save your work. Open the
index.html file in your web browser. Add
?clickTag=http://www.appnexus.com at the end of the URL in the address bar.
Refresh the page and click on the ad. A new window with AppNexus' website should open in your browser. When the ad is served AppNexus sets the value of clickTag to AppNexus' click tracker and a redirect to the landing page URL provided for the creative in Console.
Step 4. Save work
Step 5. Zip creative contents
Select all of the contents. Compress the contents into a
You are now ready to upload your HTML5 creative onto the AppNexus platform.
AppNexus follows IAB HTML5 guidance for clickTag (Section 3.10.1). The ad URL returned to a publisher's page includes a clickTag parameter in the query string. Ad developers who prefer not to use AppNexus'