Dynamic UTM Parameters in Google Ads: A Step-by-Step Guide

Content Roadmap

Using dynamic UTM parameters in your Google Ads campaigns can provide invaluable insight into your marketing performance. This guide will walk you through everything you need to know to implement dynamic UTM tracking.

What are Dynamic UTM Parameters?

UTM parameters are tags you can add to URLs to track campaigns, keywords, ads, and more in your analytics platform.

Dynamic UTM parameters take this a step further by automatically pulling data from your Google Ads account to populate customised UTM tags. This eliminates the need to manually update UTM parameters every time you make a change in your campaigns.

Some examples of dynamic UTM parameters include:

  • {campaignid} – Automatically inserts the campaign ID
  • {adgroupid} – Automatically inserts the ad group ID
  • {keyword} – Automatically inserts the keyword

Benefits of Dynamic UTM Parameters

Here are some of the key benefits of using dynamic UTM parameters:

  • Simplified tracking – With dynamic parameters, you don’t have to continually update UTM tags every time you tweak campaigns. The tags automatically stay up-to-date.
  • Deeper insight – Dynamic parameters give you visibility into campaigns, ad groups, keywords, and other levels of data directly in your analytics platform.
  • Enhanced reporting – You can easily filter and segment your analytics data by the UTM parameters to see how different elements of your campaigns are performing.
  • Optimised campaigns – The granular data from dynamic UTMs enables you to identify low-performing areas and optimise your Google Ads campaigns accordingly.

How to Create and Use Dynamic UTM Parameters

Illustration about how dynamic utm parameters work.

Follow these steps to implement dynamic UTM tracking:

Step 1: Enable Dynamic Parameters at Account Level

Screenshot of the section in google ads to enable auto tagging

First, you need to enable dynamic parameter substitution at the account level in your Google Ads settings:

  • Navigate to Account Settings
  • Under Auto Tagging, check the box for Tag the URL that people click through from my ad.

Step 2: Create a Tracking Template

Next, create your tracking template under Campaigns > Tracking > Tracking Templates in your Google Ads account. Click + to create a new tracking template and give it a name that describes the dynamic parameter(s) you want to use.

Which campaigns require you to add manual tags to destination URLs for tracking

According to the industry common practices, the campaigns that require manual tags on destination URLs for tracking are:

  • Social media campaigns
  • Email marketing campaigns
  • Pay-per-click (PPC) advertising campaigns
  • Affiliate marketing campaigns
  • Content marketing campaigns
  • Event marketing campaigns

You can use the Analytics URL builders to construct your URLs with manual tags. If you use manual tagging and auto-tagging together, then the source, medium, and other traffic-classification dimensions use the auto-tagged values. The manually tagged values for utm_content and utm_term are used for the Manual Ad Content and Manual Term dimensions.

Understanding the Parameters

ParameterShort DescriptionLong Description
{adgroupid}Ad group IDInserts the specific ID number assigned to the ad group that served the ad. This allows you to filter analytics data by ad group.
{campaignid}Campaign IDInserts the specific ID number assigned to the campaign that served the ad. This allows you to filter analytics data by campaign.
{creative}Ad creative IDInserts the specific ID number assigned to the particular ad creative variant that was shown. This allows you to see performance for each version of an ad.
{device}Device typeInserts the general category of device the ad was served to, such as mobile, tablet, desktop, wearable, etc. Useful for seeing device performance.
{devicemodel}Device modelInserts the specific model name of the device the ad was served to, like iPhone X, Samsung Galaxy S10, etc. Allows more granular tracking by device model.
{extensionid}Extension IDInserts the specific ID number of any extension attached to the ad, like call, app, sitelink, etc. Allows you to identify impact of specific extensions.
{feeditemid}Feed item IDFor shopping ads, inserts the specific ID number of the product feed item that was advertised. Can be used to track performance by product.
{gclid}Google click IDInserts the unique ID string Google assigns to each ad click for tracking purposes. Allows connecting Google Analytics data to Google Ads.
{ifcontent:[value]}Ad content parameterInserts a specified value if the ad uses a particular format like video, image, etc. Can be used to track performance by creative content.
{ifmobile:[value]}Mobile device parameterInserts a specified value if the ad was served to a mobile device. Useful for tracking mobile vs desktop performance.
{ifnotmobile:[value]}Non-mobile device parameterInserts a specified value if the ad was NOT served to a mobile device. Useful for tracking mobile vs desktop performance.
{ifsearch:[value]}Search ad parameterInserts a specified value if the ad was a search ad. Helpful for tracking search vs display ad performance.
{keyword}KeywordInserts the specific keyword that triggered the ad to be shown. Enables filtering data by keyword performance.
{loc_interest_ms}Location intent IDInserts the ID number of a geographic intent audience the ad targeted, like “people interested in X”. Allows tracking by location targeting.
{loc_physical_ms}Location IDInserts the ID number of a physical location the ad targeted. Useful for location-based tracking.
{matchtype}Match typeInserts the match type of the keyword that triggered the ad, like broad, phrase, exact, etc. Allows analysis by match type.
{network}NetworkInserts the specific network the ad was served on – Google Search, Display Network, Search Partners, etc. Allows performance comparison across networks.
{param1}Custom parameter 1Inserts the value of a custom parameter you define. Useful for adding campaign names, promo codes, etc.
{param2}Custom parameter 2Inserts the value of a second custom parameter you define. Useful for adding campaign names, promo codes, etc.
{placement}Placement IDFor display ads, inserts the ID of the specific site, page, or app the ad appeared on. Enables tracking by placement.
{random}Random numberInserts a random numeric value. Can be used to add randomness to parameter values.
{targetid}Target IDInserts the ID number of the targeted audience, keyword, placement, etc. the ad used. Allows segmenting data by targeting.
{target}TargetInserts the text of the targeted audience, keyword, placement, etc. the ad used. Allows segmenting data by targeting.
Made for you: The Best Tracking Template to Use in Your Google Ads Campaigns:


This tracking template inserts the LP URL, followed by UTM parameters for source, medium, campaign, term (using ad group ID, keyword, and match type), and content (using the creative ID).

Step 3: Add Dynamic UTM Parameters

Within your tracking template, click Insert Parameter to add whatever dynamic UTM tags you want to include. For example, {campaignid}, {keyword}, {matchtype}, etc.

Step 4: Add the Tracking Template to Campaigns

Setting up tracking templates for dynamic utms

Go back to Campaigns and edit each campaign you want to track. Under Tracking:

  • Enable dynamic parameters at the Campaign Settings level
  • Click None next to Tracking template and select the template you created
  • Click Save for changes to take effect

Enabling at both account and campaign level ensures the parameters will work correctly.

Step 5: Test the Dynamic UTMs

Once your template is applied to campaigns, test it is working by:

  • Clicking on one of your live ads to trigger the UTMs
  • Checking the destination URL contains the populated parameters
  • Confirming tracking data shows up in your analytics platform

Setting Up Tracking Templates

To maximise the benefits of dynamic UTMs, set up individual tracking templates for each element you want to track:

Step 1: Identify Parameters to Track

Decide which campaign, ad, keyword, and other data points would be useful to track separately. Common options include campaign, ad group, keyword, device, ad, etc.

Step 2: Create Tracking Templates

Following the steps above, create a unique tracking template for each parameter. For example, a template just for {campaignid}, another just for {keyword}, etc.

Step 3: Add Templates to Campaigns

Apply each tracking template to the appropriate campaigns or ad groups. Make sure you only have one template enabled at a time.


Implementing dynamic UTM tracking for Google Ads provides powerful insight into your PPC campaigns. With some simple setup steps, you can eliminate manual UTM tag updates and streamline your campaign reporting. Refer to Google’s help docs for additional guidance on leveraging dynamic parameters.


Here are some common issues that may arise with dynamic UTMs and how to address them:

  • Missing data in analytics – Check that auto-tagging is enabled, and you’ve added the tracking template to the campaign. Clear your cache/cookies.
  • Error applying tracking template – Verify the template name doesn’t include any special characters or spacing issues. Check that your template syntax is correct.
  • Auto-tagging not working – Confirm auto-tagging is enabled at both the account and campaign level. Check that your rules are properly configured.
  • Verify dynamic substitution is enabled at the account and campaign level
  • Check for errors in your tracking template syntax
  • Clear your browser cache and test clicks again
  • Ensure your analytics platform is collecting UTM parameters

Case Study: Outdoor Gear Company

One CFD Trading Broker implemented dynamic UTM tracking to better analyse the performance of specific keywords in their main Google Ads campaign promoting a new hiking backpack line. By creating a template with the {keyword} parameter, they could see in Google Analytics which keywords were driving the most clicks and conversions for the new backpack landing pages. This enabled them to optimise the campaign by increasing bids on high-converting keywords.

Additional Resources

For more guidance on setting up dynamic UTMs in Google Ads, see:

UTM Building Tools:

Analytics Platforms Supporting UTM Tracking

  • Google Analytics
  • Adobe Analytics
  • Matomo
  • Mixpanel
  • Amplitude
  • Heap
  • Crazy Egg
  • Kissmetrics
  • Segment
  • IBM Digital Analytics
  • AT Internet
  • Chartbeat
  • Piwik PRO
  • Hotjar
  • Woopra
  • Yandex Metrica
  • Gauges
  • GtM
Jesus Guzman

M&G Speed Marketing LTD. CEO

Jesus Guzman is the CEO and founder of M&G Speed Marketing LTD, a digital marketing agency focused on rapidly growing businesses through strategies like SEO, PPC, social media, email campaigns, and website optimization. With an MBA and over 11 years of experience, Guzman combines his marketing expertise with web design skills to create captivating online experiences. His journey as an in-house SEO expert has given him insights into effective online marketing. Guzman is passionate about helping businesses achieve impressive growth through his honed skills. He has proud case studies to share and is eager to connect to take your business to the next level.