Click tracking in HTML5 / Rich Media banners
Ad Butler uses a variety of macros to facilitate tracking clicks on HTML 5 Rich Media Ads. When an HTML5 ad is served by Ad Butler, any macros present in "index.html" will be replaced. If the ads are incoming from a 3rd-party ad server, read more about serving 3rd Party ad tags ...
View a full list of our macros....
HTML5 Supported Macros
|[TRACKING_LINK]||Unescaped click tracking macro.|
|[TRACKING_LINK_ENCODED]||Escaped click tracking macro.|
|[RND]||A random number generator.|
|[TIMESTAMP]||The current timestamp.|
Click Macro Implementation
The most common method of implementing click tracking in an HTML5 ad is inserting the click macro script into the index HTML file of your ad.
In theof the HTML file, add:
<script>window.clickTag = '[TRACKING_LINK]';</script>
In the click handler function of your ad, ensure that window.clickTag is used as the redirect URL:
Basic Link Method
<a href="[TRACKING_LINK]" target="_blank">Your Existing Ad Code Here</a>
You will want to ensure you place the
<a href="[TRACKING_LINK]" target="_blank"> just after the
<body> part of your ad, and place the
</a> just before the
of your HTML5 Rich Media Ad.