Integrating the AppNexus HTML5 Library with Ads Created in Google Web Designer
Follow these instructions to modify an ad created in Google Web Designer such that it works seamlessly with the AppNexus HTML5 Library. This is required to properly track clicks.
You will require a text editor to complete the procedure below. If you do not have one, we recommend Sublime Text.
Step 1: Locate the
Before you begin, locate the folder containing the ad created in Google Web Designer. If the ad is located in a
.zip file, you must unzip the file to reveal a folder containing its various assets.
Then, locate and open the file named
index.html . This file is where you will make all of the necessary changes in the steps below.
Step 2: Add the AppNexus HTML5 Library
Ensure that the actual AppNexus HTML5 Library is linked to inside
index.html . The library can be found here: https://acdn.adnxs.com/html5-lib/1.3.0/appnexus-html5-lib.min.js
Link the 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 3: Replace hard-coded URL with
You could have an ad created in Google Web Designer that has a hard-coded URL embedded.
gwd-events="handlers" in the
index.html file to find hard-coded URLs. If they are present, you will find a block of code that looks like this:
The hardcoded URL (in this case,
) will vary based on the specific ad you are working with.
"https://appnexus.com" (including the quotation marks) with
APPNEXUS.getClickTag(). The function should something look like:
Step 4. Save changes
Step 5. Re-zip creative contents
Select all of the contents within the folder created when you unzipped the file. Compress the contents into a new
You are now ready to upload your HTML5 creative onto the AppNexus platform.
IAB Validator (Optional)
If you would like to verify how this creative measures up to IAB guidelines, you can do so using the HTML5 Ad Validator tool.