Search
Clear search
Close search
Google apps
Main menu

Troubleshoot macros in third-party creatives

A macro is a short command or shorthand for an instruction to the DFP server. If you place a macro in the code for a custom or third-party creative, the DFP server will execute the macro when the creative is served. Learn more about macros

Two macros necessary for a third-party creative to function properly with DFP are %%CLICK_URL_UNESC%% and %%CACHEBUSTER%%. Learn more about trafficking third-party creatives

  • The click macro, %%CLICK_URL_UNESC%% (unescaped) or %%CLICK_URL_ESC_ESC%% (double-escaped), ensures that DFP can count a click when a user clicks on the creative. Without this macro in the correct place in your third-party code, you will most likely not track clicks on a third-party creative.

  • The cache-busting macro, %%CACHEBUSTER%%, ensures that a fresh call is made to the ad server every time the code is executed so you're accurately counting impressions. Without this macro, you're more likely to see impression counting discrepancies between DFP and the third-party ad server.

There's no industry standard about the position of macro placeholders in creative code, and each third-party vendor has different implementations. Therefore, the DFP support team is unable to provide specific guidance on where to place these macros in your third-party creative code. Your third-party vendor is your best resource for this information.

DFP auto-recognizes creative code from certified third-party vendors and can automatically insert macros when you traffic their code as third-party creatives. If your certified third-party's creative code is not being auto-recognized, please send us the name of the creative in question, the original creative code you were given, and the name of the certified vendor who provided this creative code.

If the creative code you'd like to traffic is not from a certified vendor, you'll need to contact your creative provider for documentation on where to place these DFP macros, because inserting a macro in the wrong spot may prevent the code from working properly. Once you have instructions from this vendor, you can manually insert the macros into the code when you traffic the creative.

For more information please see our comprehensive guide to macros in DFP. You may find the instructions in this article are useful in ensuring you've trafficked your creative according to our best practices.

Was this article helpful?
How can we improve it?