Implementing impression tracking in custom creative templates

Accurate impression tracking is essential for evaluating the performance of your ad campaigns. Our custom creative templates for Google Ad Manager (GAM) are designed to facilitate both GAM's default impression tracking and the integration of third-party tracking tags.

Default Impression Tracking

Each template includes built-in support for GAM's default impression tracking, ensuring that all impressions are automatically recorded within GAM without additional configuration.

Adding Third-Party Impression Tracking

To incorporate third-party impression tracking, our templates provide two distinct fields:

  1. Third-Party Impression Tracking URL:
    • Purpose: Allows the inclusion of a single third-party impression tracking URL.
    • Usage: Enter the complete URL provided by your third-party tracking service into this field.
    • Note: This field supports only one URL.
  2. Third-Party Tags:
    • Purpose: Enables the addition of multiple third-party tracking tags in HTML format.
    • Usage:
      • Input each tracking tag (e.g., <img>, <script>) directly into this field.
      • Ensure that each tag is placed on a new line or immediately following the previous tag without separators.
    • Note: This field does not support plain URLs; tags must be in proper HTML format.

Implementing Cache-Busting

To prevent browsers from caching third-party tracking tags—which can lead to inaccurate impression counts—it's advisable to incorporate a cache-busting mechanism. GAM provides the %%CACHEBUSTER%% macro for this purpose.

Steps to Implement Cache-Busting:

  1. Identify the Random String Placeholder:
    • Locate the portion of your third-party tracking tag's URL that represents a random or unique string, often indicated by placeholders like {random} or similar.
  2. Replace with GAM's CacheBuster Macro:
    • Substitute the placeholder with %%CACHEBUSTER%%.
    • Example:
      • Original URL: https://ad.doubleclick.net/ad/Nxxxx.site/Byyyy;sz=1x1;ord={random}
      • Updated URL: https://ad.doubleclick.net/ad/Nxxxx.site/Byyyy;sz=1x1;ord=%%CACHEBUSTER%%

This substitution ensures that each request to the tracking URL is unique, thereby preventing caching and ensuring accurate impression tracking.

For more detailed information on GAM macros and their applications, please refer to Google's official documentation: GOOGLE SUPPORT