Google Ads: How to Set Up Account-level UTM Parameters - Practical Ecommerce

2022-01-03 15:11:16 By : Ms. Tina Cao

UTM parameters can help marketers track the performance of Google Ads to individual campaigns, ad groups, and keywords. Unfortunately, manually creating tracking parameter strings takes time and is error-prone.

Instead, automate the process. Turn on the account-level Google Click Identifier, set up account-level UTM parameters, and use a script to create ad-group-level custom parameters.

The origin of Google Analytics is Urchin Software Corp., which Google acquired in 2005. Before then, Urchin created a process for tracking clicks on an URL called “Urchin tracking module” — UTM. Google retained that methodology.

Google Click Identifier (GCLID) is Google’s method of passing click info from Ads to Analytics.

Thus the terms “UTM” and “GCLID” describe tracking identifiers — also called “parameters” — which are short snippets of code added to the end of a website’s address. Here’s a sample UTM:

In the above example, the traffic source is Google, the medium used is an ad, and the campaign is called “campaign.”

The question mark (?) at the beginning of the parameter string appends the website address.

An ampersand (&) separates individual parameters.

For companies that use Google Analytics to track ad performance, the Google Click Identifier may be the simplest way to measure ad campaign success. This URL tracking parameter uses a unique code to pass detailed information from Google Ads to Google Analytics.

The GCLID can be enabled at the account level, which means all of the account’s campaigns and ads will include it.

Auto-tagging Google Ads URLs with the GCLID is one of the most direct ways to pass ad data to Google Analytics.

To turn on GCLID auto-tagging:

Once turned on, the GCLID will be added to all ad URLs. Here is an example.

Not all analytics tools, CRMs, and ad-measurement platforms can use or interpret the GCLID. However, these systems can almost certainly parse UTM parameters, which consist of five sections.

To create account-level UTM parameters in Google Ads:

Tracking template. The key here is the tracking template.

The tracking template is the key to setting up account-level UTM parameters in Google Ads.

Let’s consider the template and how it is constructed.

The first section includes the abbreviation “lpurl” (“landing page URL”) wrapped in curly braces. The braces tell Google Ads that this is a parameter it needs to parse. Specifically, it will replace “lpurl” with the ad’s target URL.

Next are the UTM parameters. Notice that the string starts with a question mark (?) and separates individual parameters with an ampersand (&).

Google Ads will automatically parse some of these parameters using information about the specific ad, such as a unique campaign identifier.

The portion of the template for the utm_campaign will output something like this:

Here “hy76syd6tsgd” is the campaign identifier that Google Ads parsed from {campaignid}.

There are several parameter variables, which Google calls “ValueTrack” parameters.

The template can include additional parameters, such as the device.

Mix and match these parameters to create an account-level tracking template and test it by clicking the “test” button in Google Ads.

The account-level tracking template described above may also include custom URL parameters typically found at the campaign or ad group level in Google Ads.

Custom URL parameters are usually set manually at the campaign or ad group level using a familiar name and value pair.

Within the tracking template, these custom URL parameters are wrapped in curly braces and start with an underscore.

If the custom parameter is not set at the campaign or ad group, Google Ads will replace it with a blank. Thus, while you might have expected the parsed URL to look like this:

It might actually look like this:

Manually, setting up custom parameters in every campaign or ad group would defeat the whole purpose of this article. Fortunately, this can be done automatically with a Google Ads script which is JavaScript that connects to a Google API within the Ads context.

The Google Ads script development environment is several layers deep in the Google Ads platform’s navigation.

Campaign and ad group names. The tracking template described earlier has a couple of shortcomings.

The utm_campaign parameter will be a campaign id, not a name. Similarly, the utm_content parameter will be an id, not a readable name describing the content. While these ids can be associated with the proper campaign and ad, it would be easier if the names were readable.

So let’s replace these with ad-group-level custom URL parameters. Replace campaignid with the campaign name and creative with the ad group title. Note the changes in the template.

Here is the script that will capture the campaign and ad group names and add them as custom URL parameters at the ad group level.

Let’s look at what makes the script work.

Main. The main function is what Google Ads will call each time the script runs. How often that happens can be set from the main scripts page.

Ad groups variable. Next, a variable stores all ad groups associated with the enabled campaigns.

Here the ad groups selector, AdsApp.adGroups(), exposes the ad group level to the script.

Iterator. The next section of the function iterates over the collection of ad groups.

As the script iterates over each ad group, it completes three tasks:

Now, each time the script runs, it will add the custom URL parameters at the ad group level. These parameters are then available on the account-level tracking template.

Copyright © 2005 - 2022. Practical Ecommerce® is a registered trademark of Confluence Distribution, Inc.