(Jump to Tech Specs)
Click tracking in DFP employs sending of a request from page when a creative is clicked (!not when he is redirected to the target page), so a click will be counted even if the target URL is malformed or if it doesn’t redirect. For non DFP hosted creatives, click maros are a must to enable DFP to record clicks or else you will get zero clicks recorded(Yes! Zero.). !Another very important point worth mentioning is the implementation of a Cachebuster macro in the third party code without which the third party ad server won’t record impressions.
Click Filtering: DFP filters clicks from scripts, web crawlers and other various sources. Multiple clicks on a single creative are also discarded. DFP uses its own spam filter which is different from the third party ad servers and even from DFA and AdSense(which are Google products!).
Click Tracking for DFP hosted creatives
Nothing much to worry here as DFP takes care of this automatically. So lets move on to third party click tracking.
Click Tracking for third party creatives
For creatives hosted elsewhere(a third party creative code), you “must” use a click macro to track clicks. A click macro expands to a click tracking URL which tells DFP to record clicks. There are two types of click macros: Escaped & Unescaped.
Unescaped Click Macro
%%CLICK_URL%% is the unescaped click URL you are supposed to use while working with image creatives.
Escaped Click Macro
%%CLICK_URL_ESC%% is the escaped click macro which you are supposed to use in case of a flash creative.
My Clicks are not getting tracked!?
If for third party creatives none of the clicks are getting tracked in DFP then 70% of the time its because you didn’t place the click macro at the right placeholder as conveyed by your third party creative code provider and 29% chances are that you didn’t use the correct click macro type(Unescaped or Escaped). Each third party creative has its own place holder for adding specific macros. If not placed properly they won’t fire or will distort the creative or worse(yes.. death).
Checking if click macro you put in your creative code is ready to track clicks
To check if click macro is working as intended and placed at the right placeholder, use the creative’s “preview in new window” option under preview. Click on the creative. If it shows a message “Your click has been recorded” then it means that the macro has been placed properly and DFP is ready to record clicks from that creative. PS: Its a known issue that for some creative it won’t show this(eg. When target creative is a flash). So no need to get tensed. In this case use Charles to check as mentioned in the para under the Tech Specs.
Use Charles to see an adclick.doubleclick.net request firing upon clicking the creative.
You can click on the creative and check in Charles if you are able to see the DFP Click tracking URL firing. If you do then the request for recoding a click goes to DFP successfully and the rest would be taken care as required.
Something worth mentioning regarding testing
I’ve had a lot of clients placing the click macro in the third party creative code and testing it in a test page directly! The intended third party creative will display on the page but the click macro part won’t expand. Only DFP can expand the DFP click macro (or any other macro too). So the code must be trafficked through DFP in order to see the click macro expanding to a click URL.
Click Macro Implementation Example
Example of DFP Click macro implementation in a third party creative code.
Type of creative: Image (JPEG)
DFP Click Macro used: %%CLICK_URL%% (Unescaped Click Macro)
The implemented final third party code (PointRoll code): Refer line no.11
Auto Insertion Of Click Macro
There is a list of DFP certified third party vendors (PointRoll, EyeWonder etc) for whose code you need not worry about the placement. DFP automatically detects the vendor name and inserts macro at the right place when you click on Insert Macros (Yes! that part you need to do). Below is a screenshot of DFP detecting a PointRoll tag.
Suggestions, additions and comments to improve this article are welcome at any point.