For Growth Channel Activate DSP HTML5 Creative, the Growth Channel click tracker will need to be manually added to each HTML5 Creative’s root HTML document (for ads generated from most builders, this document is named index.html in the root directory of the HTML5 Asset Package zip file). All click through URLs must be located in the root HTML document and the Growth Channel click tracker must be prepended to all click through URLs to ensure tracking of clicks during ad serving.
Below are guidelines on how the Growth Channel click tracker can be added into the document for a sample set of scenarios. Please note that the guidelines do not cover all possible scenarios. It is up to you to ensure that the click tracker is included in the HTML document.
Scenario A: Click Implementation via JavaScript Variables
HTML5 ads may implement click through via JavaScript variables.
In such cases, the click through is often implemented via a variable named ‘clickTag’ (although different may have different names for the variable) enclosed within script tags as shown below:
/*
<script type="text/javascript">
<--Javascript or HTML Markup-->
var clickTag = "https://www.destinationURL.com"; </script>
*/
In this case, Growth Channel unencoded click tracker will be prepended to the click through url (https://www.destinationURL.com) as shown below:
/*
<script type="text/javascript">
<--Javascript Markup-->
var clickTag = "[UNENCODED_CLICK_REDIRECT]https://www.destinationURL.com"; </script>
*/
Please note that using the following method to implement click through in the body of the HTML document in Firefox will result in a successful redirect to the click through url in a new tab.
However, the ad served in the original tab will disappear and be replaced by the text “[object Window]”
.javascript:window.open(“[UNENCODED_CLICK_REDIRECT]https://www.destinationURL.com”)
This is because Firefox expects a value to be returned for the JavaScript function. If it does not receive a value, it replaces the HTML body with “[object Window]”. This can be fixed by forcing the expression to return a value by modifying the click through expression to:
javascript:void(window.open(“[UNENCODED_CLICK_REDIRECT]https://www.destinationURL.com”));
Scenario B: Click Implementation via HTML Attributes
HTML5 ads may implement click through via HTML attributes. In such cases, the click through is often implemented via the ‘href’ attribute which is enclosed in anchor <a> tags. as shown below:
<a href="https://www.destinationURL.com"> <--HTML Markup--> </a>
In this case, Growth Channel unencoded click tracker will be prepended to the click through url (https://www.growthchannel.io) as shown below:
<a href="[UNENCODED_CLICK_REDIRECT]https://www.destinationURL.com"> <--HTML Markup--> </a>
Please note that using the href attribute to implement click through will result in the click through breaking when all of the following conditions are met:
To avoid broken redirects when the above conditions are met, please use an alternative method for implementation of click through.
file:///LocalFilePath/[UNENCODED_CLICK_REDIRECT] https://www.destinationURL.com
Additional Helpful Resources:
IAB HTML5 Resources: https://www.iab.com/?s=html5
IAB MRAID Resources: https://www.iab.com/?s=mraid&post_type=iab_guideline
IAB VPAID Resources: https://www.iab.com/?s=vpaid&post_type=iab_guideline
IAB Creative Specifications: https://www.iab.com/?s=creative%20specifications
**These are not always the same as Growth Channel specifications as we normalize against our supply source requirements.**