%%MACRO%%

Google Ad Manager Macros

Google Ad Manager wraps macros in double percent signs and is strict about case — %%CACHEBUSTER%% works and %%cachebuster%% does not. The three click variants differ only in how much escaping they apply, and picking the wrong one is the most common trafficking error on the platform.

Click tracking

MacroExpands to
%%CLICK_URL_UNESC%%The click-tracking URL, unescaped.The default. Place it immediately before the click-through URL.
%%CLICK_URL_ESC%%The click-tracking URL, escaped once.Use when the click tracker is a parameter inside another URL.
%%CLICK_URL_ESC_ESC%%The click-tracking URL, escaped twice.Only when the receiving tracker decodes twice.
%%DEST_URL_ESC%%The click-through destination URL, escaped.

Cache busting

MacroExpands to
%%CACHEBUSTER%%A random number.Case-sensitive. Omitting it is a common cause of impression discrepancies.

Size and placement

MacroExpands to
%%WIDTH%%Creative width from the target ad unit size.
%%HEIGHT%%Creative height from the target ad unit size.
%%ADUNIT%%The full ad unit path, including the network code.
%%SITE%%The domain taken from the ad tag's URL parameter.

Custom targeting

MacroExpands to
%%PATTERN:key%%The value of a custom targeting key passed into the creative.
%%PATTERN:TARGETINGMAP%%The entire targeting string.

The one that catches people out

Choose the click macro by where it sits, not by habit. Use the unescaped version when the macro comes immediately before the destination URL, and the escaped version when the click tracker is being passed as a parameter inside another URL. The double-escaped form exists for the case where a third-party tracker decodes twice — you need it rarely, and using it when it is not required produces a destination full of literal %25 sequences.

To check how many times a value has been encoded before trafficking it, the URL encoder and decoder reports encoding depth — which is usually faster than testing an impression to find out.

Verified against Google Ad Manager Help — Macros on 30 July 2026. Platforms change macros without notice — check the source before relying on this for a live campaign.