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:
- 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.
- 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:
- 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.
- 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%%
- Original URL:
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
Articles
- What is custom creative templates for Google Ad Manager?
- What are the requirements?
- How to download a purchased custom creative template?
- How to install or update a custom creative template?
- How to change default values for a custom creative template?
- How to use a custom creative template?
- How to change HTML5 ad contents depending on a state of the Expander?
- How to generate a creative (creative template) preview URL?
- How to use JS callback events with custom creative templates?
- Managing HTML and ZIP Files with Creative Templates
- Implementing impression tracking in custom creative templates
- Implementing 3rd-party viewability tags in custom creative templates
- How to use HTML banners with multiple clickTAGs