Home / Tools / Google Ad Manager
✦ Google Ad Manager

GAM click-through URL builder

Tag the advertiser's landing page with UTM parameters and Ad Manager macros, so every click reports its order, line item and creative in GA4.

Landing page and parameters

Start from

Output

Click-through URL

Paste into the creative's Destination (click-through URL) field. Ad Manager fills in the macros when the ad serves.

What a click looks like

Sample IDs. The real ones are filled in by Ad Manager when the ad serves.

Custom or third-party creative

When the link is in the creative code, start the href with the click macro so Ad Manager counts the click. The landing page after it is escaped, so its & don't break the click URL.

Where to paste it

  1. Image creative: in Delivery → Creatives, open the creative and paste the URL into Destination.
  2. Per line item: creatives use the line item's click-through URL unless you tick the override for them in the line item's creative settings.
  3. Custom or third-party creative: use the link tag above in the creative code. For a third-party click tracker that takes the Ad Manager click URL as a parameter, use %%CLICK_URL_ESC%% instead.
  4. Preview the creative and click it to check that the click is recorded and the UTM parameters reach the landing page.

Ad Manager macros in a click-through URL

Ad Manager replaces macros in click-through URLs when the ad serves, so one URL can report which order, line item and creative sent the visitor. The ID macros use the form %e...!: %ebuy! (order), %eaid! (line item), %ecid! (creative), %eadv! (advertiser) and %epid! (ad unit). %%SITE%% gives the domain from the ad tag's URL parameter, and %%PATTERN:key%% the value of a key-value from the ad request. Macros are case-sensitive.

There's no macro for the order or line item name, so type utm_campaign yourself or use the order ID and look the name up in Ad Manager. Keep typed values lowercase with underscores so GA4 doesn't split rows. A medium of display, banner or cpm puts the clicks in GA4's Display channel; check others with the GA4 channel checker.

The click macro. An image creative tracks clicks on its own. In a custom or third-party creative the link is part of the code, so Ad Manager only counts the click if the href starts with %%CLICK_URL_UNESC%%. The landing page that follows must be escaped: if it isn't, the & between your UTM parameters can be read as part of the click URL and the parameters may not reach the site. Don't put the click macro in an image or iframe source; that records a click on every render, which Ad Manager filters out as invalid.

%%CACHEBUSTER%% is for impression and tracking URLs, not for UTM values. Avoid lowercase percent-encoding such as %c3 in the URL: Ad Manager reserves %a %c %h %i %n %p %k for macros.

Frequently asked questions

Where does the click-through URL go in Google Ad Manager?

For an image creative, paste it into the Destination field of the creative. A creative added to a line item uses the line item's click-through URL unless you override it for that creative in the line item's creative settings.

When do I need %%CLICK_URL_UNESC%%?

In custom and third-party creatives, where the link is in the creative code. Put %%CLICK_URL_UNESC%% at the start of the link's href, followed by the escaped landing page URL, so Ad Manager can count the click. Ad Manager adds click macros automatically only to third-party tags it recognizes; in custom creatives you add them yourself.

What's the difference between %%CLICK_URL_UNESC%% and %%CLICK_URL_ESC%%?

Use %%CLICK_URL_UNESC%% at the beginning of a link. Use %%CLICK_URL_ESC%% when the Ad Manager click URL is a parameter of another URL, for example inside a third-party click tracker's redirect.

Is there an Ad Manager macro for the order or line item name?

Not in Google's list of Ad Manager macros. There are ID macros: %ebuy! for the order, %eaid! for the line item, %ecid! for the creative, %eadv! for the advertiser and %epid! for the ad unit. Type the campaign name, or use the order ID.

Does Ad Manager support %%ADVERTISER_ID%% or %%LINE_ITEM_ID%%?

No, those names aren't in Ad Manager's macro list, so they won't be filled in. Ad Manager's ID macros use the %e...! form: %eadv! (advertiser), %ebuy! (order), %eaid! (line item) and %ecid! (creative). Macros are case-sensitive.

Related guides

More free tools