Skip to content

How to Add UTM Parameters to Google Ads with a Tracking Template

Appending UTM parameters to every ad URL by hand works for a handful of ads, but it becomes slow and easy to get wrong as campaigns multiply. Google Ads offers a cleaner route: define the tagging pattern once in a tracking template, then let the platform fill in the variable parts. This guide explains the template syntax, where to place it, how to define custom values, and how to confirm the final URLs before you rely on the data.

Why a tracking template beats editing each ad URL

A tracking template is a URL pattern that Google Ads applies when a person clicks an ad. Instead of pasting the same UTM string into every final URL, you write the pattern once and let Google Ads substitute the landing page and any dynamic values. That reduces repetitive edits and keeps the parameter structure consistent across campaigns, which in turn makes analytics reporting easier to compare.

Google Ads accepts tracking templates at the account, campaign or ad group level. Account level is usually the most efficient starting point because it applies broadly and removes the need to remember tagging on each new ad. Campaign or ad group level can be useful when a specific group needs different values, but it also creates more places to maintain.

The template syntax: placeholders and what they do

A tracking template combines a landing-page placeholder with UTM parameters. The supplied example pattern is:

{lpurl}?utm_medium=cpc&utm_source=google&utm_campaign={_campaign}&utm_term={keyword}

Each placeholder has a distinct role:

  • {lpurl} stands for the landing page URL. It normally goes at the start of the template so Google Ads sends the visitor to the URL attached to the ad.
  • {_campaign} is a custom parameter. You define its value yourself, and custom parameter names begin with an underscore.
  • {keyword} is a ValueTrack parameter. Google Ads fills it with the keyword the user searched for before clicking the ad. ValueTrack names do not begin with an underscore.

A useful field map for the recommended structure is:

UTM fieldRecommended valueSource of value
utm_mediumppcFixed text
utm_sourcegoogleFixed text
utm_campaignCampaign nameCustom parameter you define
utm_termAd group nameCustom parameter you define
utm_contentKeyword searchedValueTrack parameter

One limitation to plan around: Google Ads does not provide ValueTrack parameters for campaign name or ad group name. It does provide campaign ID and ad group ID, but those are long numeric strings that are hard to read in reports. If you want readable campaign or ad group names in your UTMs, define them through custom parameters.

Step-by-step setup in Google Ads

  1. Decide what information to capture. The recommended structure uses utm_medium=ppc, utm_source=google, the campaign name, the ad group name and the keyword the user searched for. You can also capture device type or match type through other ValueTrack parameters if those dimensions matter to your reporting.
  1. Build the template in a text editor. Start from the example pattern and change only the parts you need. Writing it outside Google Ads first makes it easier to check the ampersands and braces before pasting.
  1. Add the template at account level. Open the Google Ads account, choose Settings from the left-hand menu, open the Tracking Options section, paste the template into the box and save.
  1. Define custom parameter values. If your template uses custom parameters, go to the relevant campaign or ad group, open Settings, select Campaign URL options, and enter each custom parameter name and value in the Custom Parameters section. Repeat this for every campaign or ad group whose values are referenced by the template.

A quick decision checklist before you save:

  • Is the template placed at the level that matches how much variation you actually need?
  • Does every custom parameter in the template have a value defined at the campaign or ad group level?
  • Are fixed values such as utm_medium and utm_source consistent with your analytics conventions?
  • Have you avoided duplicating UTM parameters already present in individual ad URLs?

Worked example: what the final URL looks like

Suppose the account-level template above is applied and a visitor clicks an ad in a brand campaign. The landing page is the site root, the custom parameter {_campaign} is set to brand-campaign, and the searched keyword is marketing attribution software. The resulting URL would be:

https://roipaths.com?utm_medium=cpc&utm_source=google&utm_campaign=brand-campaign&utm_term=marketing attribution software

This shows how the template and the custom parameter value combine. The fixed UTM values stay the same, while the campaign and keyword portions change according to the ad and the search. Note that the example template maps the searched keyword to utm_term, while the recommended field structure above maps ad group name to utm_term and keyword to utm_content; pick one convention and apply it consistently so reports stay comparable.

How to test that the template is working

After saving, go back to where you added the template at the account level (Admin - Account Settings - Tracking) and click the Test link. Google Ads displays a popup listing the links from the ads in the account, including the full URL each ad sends visitors to. Review the table and confirm the UTM parameters appear as intended.

Two common failure patterns are worth distinguishing:

  • A custom parameter appears literally in the URL, such as {_campaign}, because no value was defined for that campaign or ad group. The fix is to add the missing custom parameter value at the correct level.
  • A ValueTrack token is empty or unexpected because the ad or keyword context does not supply it. Check that the token is valid for the campaign type and placement where it is used.

Testing the template before launch is more reliable than discovering malformed URLs in analytics after spend has accumulated.

From click data to leads and customers

UTM parameters tell your analytics tool which campaign, ad group and keyword brought a visitor to the site. They do not, by themselves, tell you which lead or customer came from which ad. To connect the two, the UTM values need to travel from the landing page into your forms and then into your CRM or sales tools.

One way to bridge that gap is a UTM-capture tool that stores the UTM values in the visitor's browser when they arrive, then writes them into hidden form fields when the visitor submits a form. That way the submission record includes both the details the lead typed in and the marketing source that brought them there. The values can then appear in form submission tables, lead notification emails, or CRM records used for reporting.

If you use a tool to automate this capture, confirm how it handles returning visitors and which form fields it populates before you rely on the data for attribution.

Frequently asked questions

Can I add UTM parameters at the account level in Google Ads?

Yes. A tracking template can be applied at the account, campaign or ad group level. Account level is usually the most efficient because it covers all ads and reduces the chance of forgetting to tag a new ad.

Why does my campaign name show up as a code instead of a readable name?

Google Ads does not offer ValueTrack parameters for campaign name or ad group name. It offers campaign ID and ad group ID, which are long numeric strings. To get readable names in your UTMs, define them through custom parameters and set the value for each campaign or ad group.

What is the difference between a custom parameter and a ValueTrack parameter?

A custom parameter starts with an underscore and its value is defined by you. A ValueTrack parameter does not start with an underscore and its value is supplied by Google Ads, such as the keyword the user searched for.

How do I check that my tracking template is producing the right URLs?

Open the account-level tracking settings and use the Test link. Google Ads shows a list of the links from your ads, including the full URL with UTM parameters, so you can review them before relying on the data.