1. Help Center
  2. Sell
  3. TradeDesk Guidelines

HTML5 Click Tracking Parameter

How to update the HTML5 Click Tracking Parameter

Insert the TTD click-tracking script after the first <head> tag before any <meta> data tags:

 

<script type="text/javascript">

function getParameterByName(name) {

name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");

var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),

results = regex.exec(location.search);

return results === null ? "" : 

decodeURIComponent(results[1].replace(/\+/g, " "));}

var clickTAG = getParameterByName("clickTAG");

</script>

 

Replace any hard-coded clickthrough URLs with:

(window.clickTAG)

 

If the URL is hard-coded into the body (ex: www.google.com) replace with:

window.clickTAG.