The following presents a guideline on how Flexitive standard and rich media tags should be edited to count clicks in Google Ad Manager. In order to track clicks follow the procedure below:
JavaScript Code
Original Code
You should have received some JavaScript code from Flexitive that looks similar to the following example:
<script src="https://tj6w5.flx10.com/libs/launcher-1.0.0.js"></script><script type="text/javascript">function whenLoaded(e){"undefined"==typeof Flexitive?setTimeout(function(){whenLoaded(e)},100):e()}function initFlexitive(){(new Flexitive).initialize({creativeId:"f0s7f6r1422d1",creativeHost:"tj6w5.flx10.com",creativeProtocol:"https",displayType:"in-page",targetId:targetId,dataFeed:"",breakpoint:"300x250",cacheBuster:"",clickTrackerUnEsc:""})}var targetId="flexitive_"+1e18*Math.random();document.write('<div id="'+targetId+'"style="width:300px; height:250px"></div>'),whenLoaded(initFlexitive);</script>
Modified Code
What you need to do is modify the URL in the <SCRIPT> tag as shown by the highlighted changes, The resulting tag should look similar to the following example:
<script src="https://tj6w5.flx10.com/libs/launcher-1.0.0.js"></script><script type="text/javascript">function whenLoaded(e){"undefined"==typeof Flexitive?setTimeout(function(){whenLoaded(e)},100):e()}function initFlexitive(){(new Flexitive).initialize({creativeId:"f0s7f6r1422d1",creativeHost:"tj6w5.flx10.com",creativeProtocol:"https",displayType:"in-page",targetId:targetId,dataFeed:"",breakpoint:"300x250",cacheBuster:"%%CACHEBUSTER%%",clickTrackerUnEsc:"%%CLICK_URL_UNESC%%"})}var targetId="flexitive_"+1e18*Math.random();document.write('<div id="'+targetId+'"style="width:300px; height:250px"></div>'),whenLoaded(initFlexitive);</script>
Note
The ad server recognises the [timestamp] placeholder and will automatically replace it with a cache buster. It is not necessary to convert it to the %%CACHEBUSTER%% macro manually.
Use %%CLICK_URL_UNESC%%
at the beginning of a link. Use %%CLICK_URL_ESC%%
when the click-tracker is the parameter of another URL.
<a href="%%CLICK_URL_UNESC%%https://www.google.com">link</a>
<a href="https://www.google.com?rd_url=%%CLICK_URL_ESC%%">link</a>