Adding click macro for: DoubleClick for Publishers (Google)
The macro that is used by DFP is the following: %%CLICK_URL_UNESC%%
This macro expands to: http://adclick.g.doubleclick.net/aclk?sa=l&ai=C8qeK&adurl=
(Campaign specific variables are removed)
In this macro you will find the redirect parameter already (&adurl=)
, so that our escaped macro can be appended direct after. The finished macro chain should look like this:
click: "%%CLICK_URL_UNESC%%{{escapedClick}}"
This will then in the end expand to the following:
http://adclick.g.doubleclick.net/aclk?sa=l&ai=C8qeK&adurl=http://click-macro-example.com
Below is a finished example:
<!-- JavaScript Ad Tag / Delta Projects / 300x250 / Downloaded at: Tue Mar 01 01:01:01 CET 2016
Campaign 1, Purchase 1
-->
<script type="text/javascript" data-sting="12345">
!function(t,n,e){"undefined"==typeof $ting&&
($ting={p:n+"s:"==t.location.protocol?n+"s":n,a:[],
h:"sting.de17a.com"},a=t.createElement("script"),
a.async=!0,a.src=$ting.p+"://"+$ting.h+"/ctrl.js",
t.body.appendChild(a)),$ting.a.push([null,12345,300,250,e])
}(document,"http",{ click: "%%CLICK_URL_UNESC%%{{escapedClick}}" });
</script>
<!-- End of Tag -->
Last modified: Mon Sep 23 2024 11:48:54 GMT+0200 (Central European Summer Time)