A macro is a change to a string of text that makes up third-party ad tags that is made in order to allow publisher and advertiser to accurately perform certain functions, such as counting impressions and clicks. Inserting macros into third-party tags involves removing a certain string of text from the “raw” tags and replacing it with a standardized code. For example, a cachebuster macro can be inserted by replacing a line of code with: %%CACHEBUSTER%%.
The most commonly-implemented macros include:
These are the most important macros to insert into ad tags. There are a number of other macros available if needed. The adjacent table contains a link to a more detailed explanation of all macros from DFP.
Many ad servers will automatically insert macros into third-party tags from known platforms. For example, DFP will show the following message after a publisher uploads third-party tags:
If the ad server platform does not recognize the tags as being generated by a known platform, publishers will need to insert the macros themselves. Below is an example of the message that appears in DFP:
It is generally possible to upload and save ad creatives without inserting macros. However, this is not recommended; it will more often than not cause headaches down the road (especially if there are discrepancies in billing).
Many third-party ad tag providers have online manuals that help advertisers insert macros “manually” if needed.