utm_source, utm_medium, utm_campaign Parameters – GA4 (Google Analytics 4)

Last Updated: February 23, 2023

What is UTM tracking in Google Analytics?

UTM tracking (also known as custom campaign tracking) refers to the tagging of your website URL with UTM parameters.

The UTM tracking is available in both GA3 (Universal Analytics) and GA4.

Note: UTM stands for ‘Urchin Tracking Module’. Urchin was the web analytics tool that Google acquired from ‘Urchin Software Corporation’ in April 2005. This tool was later re-branded as Google Analytics.

Why do you need UTM tracking?

Through UTM tracking, you can send detailed information about a marketing campaign to Google Analytics.

For example, through UTM tracking, you can send the following information about a Facebook marketing campaign to GA:

  • The name of the particular Facebook campaign which generated traffic and sales on your website.
  • The name of the particular ad set within the Facebook campaign that generated traffic and/or sales on your website.
  • The name of the particular ad within the particular Facebook ad set that generated traffic and/or sales on your website.

Without UTM tracking, Google Analytics will only tell you that you generated traffic and/or sales from Facebook.

It won’t tell you which particular campaign, adset or ad copy that generated traffic and/or sales on your website.

All you will see, by default in GA, is the traffic and sales from dozens of Facebook referrers.

In order to track the performance of each individual Facebook ad campaign in Google Analytics, you would need to add various UTM parameters at the end of the destination URL of each Facebook ad:

utm parameters added to facebook ads

Following is an example of a Facebook ad URL which contains UTM parameters:

https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=social&utm_campaign=pdf-book-campaign&utm_content=ad1

These UTM parameters have the power to overwrite the original referrer and send that information to GA, which cannot be sent otherwise.

Similarly, without UTM tracking, Google Analytics will only tell you that you generated traffic and/or sales from email.

It won’t tell you which particular email newsletter campaign or link within the email that generated traffic and/or sales on your website.

Whenever a referrer is dropped or is not passed, Google Analytics is not able to determine the origin of the traffic source and report that traffic as direct traffic.

One effective way to reduce direct traffic in Google Analytics is by using UTM tracking.

Non-web documents (like Microsoft Word, Excel, PowerPoint, PDF, etc.) do not send a referrer.

traffic from word document

So if a user clicks on a link embedded in a word document to visit your website, then GA would start a new session but without a referrer being passed by the user’s web browser.

Hence the traffic would be reported as direct traffic.

If you want the traffic from the word document to be reported by GA, then you would need to use the UTM campaign tracking parameters in the embedded URLs like the one below:

https://www.optimizesmart.com/install-google-analytics-4-on-shopify/?utm_source=ms-word&utm_medium=non-web-document&utm_campaign=channel-grouping-in-google-analytics

Desktop email clients (like Microsoft Outlook) and Instant messenger (like Skype, Facebook Messenger, Whatsapp etc.) do not send a referrer.

outlook

So if a user clicks on a link embedded in an Outlook email to visit your website, then GA would start a new session but without a referrer being passed by the user’s web browser.

Hence the traffic would be reported as direct traffic.

If you want the traffic from Outlook to be reported by GA, then you would need to use the UTM campaign tracking parameters in the embedded URLs like the one below:

https://www.optimizesmart.com/install-google-analytics-4-on-shopify/?utm_source=ms-outlook&utm_medium=email&utm_campaign=channel-grouping-in-google-analytics

Similarly,

Instant messenger (like Skype, Facebook Messenger, Whatsapp etc.) and other online chat rooms do not send a referrer. Traffic from such apps is reported as direct traffic by Google Analytics.

If you want the traffic from instant messengers to be reported by GA, then you would need to use UTM tracking.

What are UTM parameters?

UTM parameters (also known as campaign parameters, campaign variables, tags, variables or utm codes) are the parameters recognized by Google for sending detailed information about your marketing campaigns to Google Analytics.

Following are the UTM parameters supported by Universal Analytics (GA3):

  1. utm_id=<value>
  2. utm_source=<value>
  3. utm_medium=<value>
  4. utm_campaign=<value>
  5. utm_term=<value>
  6. utm_content=<value>

Following are the UTM parameters supported by Google Analytics 4:

  1. utm_id=<value>
  2. utm_source=<value>
  3. utm_medium=<value>
  4. utm_campaign=<value>
  5. utm_term=<value>
  6. utm_content=<value>
  7. utm_source_platform=<value>
  8. utm_campaign_id=<value>
  9. utm_creative_format=<value>
  10. utm_marketing_tactic=<value>

Each UTM parameter is made up of ‘key=value’ pair.

For example,

If utm_source=facebook

Then ‘utm_source’ is the key, and ‘facebook’ is the value.

Similarly,

If utm_medium = paidSocial

Then ‘utm_medium’ is the key, and ‘paidSocial’ is the value.

A website URL which contains UTM parameters is called a custom campaign.

Following is an example of a custom campaign:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

‘Keys’ of UTM parameters in Google Analytics

Following are the six keys of UTM Parameters in Universal Analytics (GA3):

  1. utm_id
  2. utm_source
  3. utm_medium
  4. utm_campaign
  5. utm_term
  6. utm_content

Following are the ten keys of UTM Parameters in GA4:

  1. utm_id
  2. utm_source
  3. utm_medium
  4. utm_campaign
  5. utm_term
  6. utm_content
  7. utm_source_platform
  8. utm_campaign_id
  9. utm_creative_format
  10. utm_marketing_tactic

All of these keys have got special meaning for Google Analytics and are case sensitive.

So ‘utm_source’ is not the same as ‘Utm_source’ or ‘utm-source’,  ‘utm_Source’ or ‘UTM_SOURCE’ or ‘utmsource’.

You need to strictly follow the format/syntax of how each key is spelled/written.

So if you use ‘Utm_source’ instead of ‘utm_source’, Google Analytics won’t understand the key and your custom campaign tracking may not work.

Note: There is no particular order in which UTM parameters’ ‘keys’ should be used in a URL. You can use any order you like.

For example, the following two URLs are the same as far as custom campaign tracking is concerned:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

https://www.abc.com/?utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb&utm_source=bing&utm_medium=ppc

‘Values’ of UTM parameters

A value of a UTM parameter should depend upon the key being used.

For example, 

The utm_source’ key is used to send information related to traffic sources to Google Analytics.

So its value should be something which denotes the traffic source (i.e. the origin of the traffic). 

What is utm_id (Campaign ID) in Google Analytics?

‘utm_id’ key is used to send information related to the unique identification number of your campaign to Google Analytics (both GA3 and GA4).

Its value should be a uniquely identified number like 17099389748.

We use ‘utm_id’ when uploading campaign data to GA3 or GA4 property.

For example,

https://www.optimizesmart.com/introducing-predictive-marketing-stage-business-optimization/?utm_source=actionetics&utm_medium=email&utm_campaign=organic-search-analysis-ga4&utm_id=17099389&utm_term=google+analytics+4&utm_content=top+banner

Where can you find the value of the ‘utm_id’ key in GA3?

GA3 does not report on the values of the ‘utm_id’ key. This key is used just for the purpose of uploading the campaign data to GA3.

Where can you find the value of the ‘utm_id’ key in GA4?

GA4 does not report on the values of the ‘utm_id’ key. This key is used just for the purpose of uploading the campaign data to GA4.

What is utm_source (campaign traffic source) in Google Analytics?

‘utm_source’ key is used to send information related to the traffic source of a custom campaign to Google Analytics (both GA3 and GA4).

Its value should be something which denotes the traffic source (i.e. the origin of the traffic).

The traffic source can be system-defined or user-defined.

A System defined traffic source is the one which Google Analytics already recognize as the known source of traffic.

Following are examples of system-defined traffic sources:

  • google
  • bing
  • yahoo
  • twitter.com
  • m.facebook.com
  • t.co etc

When you use a system defined traffic source as the value for your ‘utm_source’ key, Google may group the traffic from custom campaign(s) with one of the system defined traffic source.

For example, consider the following URL:

https://www.abc.com/?utm_source=google&utm_medium=organic&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here,

The value of utm_source is ‘google’. That means the traffic source is ‘google’.

The value of utm_medium is ‘organic’. That means the traffic medium is ‘organic’.

Google Analytics will report this traffic as:

google organic

So Google Analytics will include the traffic from this campaign in Google Organic Search:

All system defined traffic sources in Google Analytics are (by default) in lowercase and case sensitive.

So for Google Analytics, the traffic source ‘google’ is different from ‘Google’.

Once you change the case /spelling of a system defined traffic source, it becomes a user defined traffic source and is reported separately by Google Analytics.

For example, consider the following URL:

https://www.abc.com/?utm_source=Google&utm_medium=organic&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here the traffic source is ‘Google’ (and not ‘google’), and the medium is ‘organic’.

So Google Analytics will report the traffic from this custom campaign like the one below:

google organic ga4

So if you are planning to use a system-defined traffic source as the value of ‘utm_source’ key, then be very careful about how you spell the traffic source name and what case (lowercase, uppercase, camelcase) you use.

One small mistake and your system-defined traffic source will be treated as a user-defined traffic source by GA.

A user defined traffic source is the one which is defined by people like me and you and which is by default, not recognized by Google Analytics.

For example, consider the following URL:

https://www.abc.com/best-seo-contract-in-the-world/?utm_source=facebook+campaign&utm_medium=social&utm_campaign=seo+contract

Here ‘facebook+campaign’ is a user-defined traffic source.

Here is how GA will report on this traffic source:

facebook campaign

Note: You can use white spaces to separate two or more words in the values of UTM parameters. Just make sure that you use + instead of a single white space while building the custom campaign.

Generally, the domain name which is expected to refer traffic to your website is used as the value for ‘utm_source’.

So if you are expecting to get traffic from Facebook (as you are running Facebook ads), you can use ‘facebook’ as the value of ‘utm_source’.

Example:

utm_source=facebook

Similarly,

If you are expecting to get traffic from Twitter (as you are running Twitter ads), you can use ‘twitter’ as the value of ‘utm_source’.

Example:

utm_source=twitter

Technically speaking, you can use any number, text or combination of ‘number and text’ as the value for the ‘utm_source’ key:

utm tracking traffic source2

Where can you find the values of the ‘utm_source’ key in GA3?

You can see the values of the ‘utm_source’ key in various Acquisition reports in GA3:

Acquisition reports in GA3 1
channels report ga3
source medium ga3
referrals report ga4
all campaigns report ga4

Where can you find the values of the ‘utm_source’ key in GA4?

You can see the values of the ‘utm_source’ key in GA4 through the following dimensions:

  1. Source
  2. First user source
  3. Session source
source dimension ga4
first user source ga4
first user source ga4 2
traffic acuqistion ga4

What is utm_medium (campaign traffic medium) in Google Analytics?

‘utm_medium’ key is used to send information related to the traffic medium of a custom campaign to Google Analytics (both GA3 and GA4).

Its value should be something which denotes traffic medium (i.e. the category of the traffic).

The traffic medium can be system-defined or user-defined.

A System defined traffic medium is the one which Google Analytics already recognize as the known category of traffic (i.e. medium)

Following are examples of system-defined traffic mediums:

  • organic
  • none
  • social
  • referral
  • cpc
  • ppc
  • banner
  • email etc

Generally, the category of the traffic which is expected to refer traffic to your website is used as the value for ‘utm_medium’.

So if you are expecting to get traffic from a social media website like ‘Linkedin’,  you can use ‘social’ as the value of ‘utm_medium’.

Example:

utm_medium=social

Similarly,

If you are expecting to get traffic from an email newsletter campaign, you can use ‘email’ as the value of ‘utm_medium’.

Example:

utm_medium=email

When you use a system defined traffic medium as the value for your ‘utm_medium’ key, Google may group the traffic from custom campaign with one of the system defined traffic medium.

For example, consider the following custom campaign:

https:..//www.abc.com/?utm_source=google&utm_medium=organic&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here the traffic source is ‘google’ and the medium is ‘organic’.

Here is how GA will report on this traffic medium:

google organic 1

So Google Analytics will include the traffic from this custom campaign under Google Organic Search:

All system defined traffic medium in Google Analytics are (by default) in lowercase and case sensitive.

So for Google Analytics, the traffic medium ‘organic’ is different from ‘Organic’.

Once you change the case /spelling of a system defined traffic medium, it becomes a user defined traffic medium and is reported separately by Google Analytics.

For example, consider the following custom campaign:

https://www.abc.com/best-seo-contract-in-the-world/?utm_source=google&utm_medium=Organic&utm_campaign=seo+contract

Here the traffic source is ‘google’, but the traffic medium is ‘Organic’ (and not ‘organic’).

So Google Analytics will report the traffic from this custom campaign like the one below:

user defined traffic medium ga4

So if you are planning to use a system-defined traffic medium as the value of ‘utm_medium’ key, then be very careful about how you spell the traffic medium and what case (lowercase, uppercase, camelcase) you use.

One small mistake and your system-defined traffic medium will be treated as user-defined traffic medium by GA.

A user defined traffic medium is the one which is defined by people like me and you and which is by default, not recognized by Google Analytics.

For example, consider the following URL:

https://www.abc.com/?utm_source=facebook&utm_medium=paidsocial&utm_content=mobile-ad&utm_campaign=car-insurance-promo-feb

Here ‘paidsocial’ is a user-defined traffic medium. 

Here is how GA will report on this traffic medium:

paidsocial ga4

Technically speaking, you can use any number, text or combination of ‘number and text’ as the value for the ‘utm_medium’ key:

utm tracking traffic source2

Where can you find the values of the ‘utm_medium’ key in GA3?

You can see the values of the ‘utm_medium’ key in various Acquisition reports in GA3:

channels medium ga3
source medium medium
all campaigns medium ga3

Where can you find the values of the ‘utm_medium’ key in GA4?

You can see the values of the ‘utm_medium’ key in GA4 through the following dimensions:

  1. Medium
  2. First user medium
  3. Session medium
medium ga4
first user medium session medium
user acquisition first user medium ga4
session medium ga4

What is utm_campaign (campaign name) in Google Analytics?

‘utm_campaign’ key is used to send the name of the custom campaign to Google Analytics (both GA3 and GA4).

You can use any of the following as the value of ‘utm_campaign’ key:

  • any text
  • any number
  • any combination of text and number
  • words separated by white spaces

For example:

utm_campaign=Book+promo+Sept2022

utm_campaign=Sept_Bumper_Sales2022

utm_campaign=Analytics-Training-Course

No matter what campaign name you select, ensure that you remain consistent with its spelling, format and case.

For GA, ‘BookPromo’ is a different campaign name than ‘bookpromo’.

Similarly, for Google Analytics,

‘Sept_Bumper_Sales2022’ is a different custom campaign name than ‘Sept-Bumper-Sales2022’ or ‘Sept+Bumper+Sales2022’

The best way to maintain consistency with the name, spelling, case and formatting of campaign names is to maintain a Google Sheet or Excel spreadsheet of all the tagged URLs and always use lowercase.

maintain a google sheet

Note: When you use ‘Sep+Bumper+Sales2022’ as the value of ‘utm_campaign’, then GA displays whitespaces between various words of the campaign name:

campaign name with spaces ga4

Use short and descriptive words as the name of your custom campaign.

If you are running a Facebook campaign, you should use the name of the Facebook campaign as the value for ‘utm_campaign’. 

If you are running an email campaign, you should the name of the email campaign as the value for ‘utm_campaign’.

Similarly,

If you are running a Twitter campaign, you should use the name of the Twitter campaign as the value for ‘utm_campaign’.

Where can you find the values of the ‘utm_campaign’ key in GA3?

You can see the values of the ‘utm_campaign’ key in various Acquisition reports in GA3:

channels campaign
source medium campaign
all campaigns campaign ga3

Where can you find the values of the ‘utm_campaign’ key in GA4?

You can see the values of the ‘utm_campaign’ key in GA4 through the following dimensions:

  1. Campaign
  2. First user campaign
  3. Session campaign
campaign dimension ga4
Acquisition overview report ga4
first user campaign ga4
session campaign ga4

What is utm_term (campaign term) in Google Analytics?

‘utm_term’ key is used to send the information related to the campaign term (paid search keyword) to Google Analytics (both GA3 and GA4).

The value of this key is often the paid keyword you are bidding on.

For example, if you are bidding on a keyword, say ‘conversion optimization’, you can use the ‘utm_term’ key like the one below:

utm_term=conversion-optimization

The ‘utm_term key is often used when you are manually tagging paid search campaigns. 

However, feel free to use this key the way you want.

For example, you can use this key to identify the type of audience you are targeting:

utm_term=new_parents

However, just remember that you should remain consistent with the spelling, formatting and case of the values of the ‘utm_term’ key.

Where can you find the values of the ‘utm_term’ key in GA3?

You can see the values of the ‘utm_term’ key in various Acquisition reports in GA3 via the ‘Keyword‘ dimension:

all campaigns keyword ga4

Where can you find the values of the ‘utm_term’ key in GA4?

You can see the values of the ‘utm_term’ key in GA4 through the following dimensions:

  1. Manual term (at present not available in GA4)
  2. Session manual term
  3. First user manual term
session manual term ga4
first user manual term ga4

What is utm_content (campaign content) in Google Analytics?

‘utm_content’ key is used to send information related to campaign content (ad version) to Google Analytics (both GA3 and GA4).

For example,

If you have got two banner ads with the same ad copy, call to action, but different graphics, you can use ‘utm_content’ key and set different values for each.

So you can later determine which ad version was more effective in terms of driving traffic and sales.

Banner Ad1: https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=social&utm_campaign=pdf-book-campaign&utm_content=ad1

Banner Ad2: https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=social&utm_campaign=pdf-book-campaign&utm_content=ad2

Note: The use of the UTM parameters: ‘utm_campaign’, ‘utm_term’ and ‘utm_content’ in an ad URL is optional. However, the use of UTM parameters: ‘utm_source’ and ‘utm_medium’ is required.

Where can you find the values of the ‘utm_content’ key in GA3?

You can see the values of the ‘utm_content’ key in various Acquisition reports in GA3 via the ‘Ad Content‘ dimension:

ad content dimension ga3

Where can you find the values of the ‘utm_content’ key in GA4?

You can see the values of the ‘utm_content’ key in GA4 through the following dimensions:

  1. Manual ad content (at present not available in GA4)
  2. Session manual ad content
  3. First user manual ad content
session manual ad content ga4
first user manual ad content

What is utm_source_platform in Google Analytics 4?

The ‘utm_source_platform’ key is used to send the name of the marketing platform which sent traffic to your website when you are using a multi-platform ad network.

GA4 often reports the following values for the ‘utm_source_platform’ key:

  • Google Ads
  • Manual
  • Shopping Free Listing
  • Search Ads 360
  • Display & Video 360 etc.

Where can you find the values of the ‘utm_source_platform’ key in GA4?

You can see the values of the ‘utm_source_platform’ key in GA4 through the following dimensions:

  1. Source platform
  2. Session source platform
  3. First user source platform
source platform ga4
session source platform ga4
first user source platform ga4 1

What is utm_campaign_id in Google Analytics 4?

The ‘utm_campaign_id’ is the key required for sending information related to the unique identification number of your campaign for GA4 data import.

Where can you find the value of the ‘utm_campaign_id’ key in GA4?

GA4 does not report on the values of the ‘utm_campaign_id’ key. This key is used just for the purpose of uploading the campaign data to GA4.

What is utm_creative_format in Google Analytics 4?

The ‘utm_creative_format’ key is just like the ‘utm_content’ key and is used to send information related to campaign content (ad version) to GA4

Just like the ‘utm_content’ key, you can also use the ‘utm_creative_format’ key to differentiate ad creatives.

Where can you find the values of the ‘utm_creative_format’ key in GA4?

You will be able to see the values of the ‘utm_creative_format’ key in GA4 through the following dimensions in the near future:

  1. Creative format
  2. Session creative format
  3. First user creative format

Note: The values of the ‘utm_creative_format’ key is currently not reported in GA4.

What is utm_marketing_tactic in Google Analytics 4?

The ‘utm_marketing_tactic’ key is used to send information related to your marketing tactics like your targeting strategies (prospecting, remarketing), bid strategies, buying strategies etc to GA4.

Where can you find the values of the ‘utm_marketing_tactic’ key in GA4?

You will be able to see the values of the ‘utm_marketing_tactic’ key in GA4 through the following dimensions in the near future:

  1. Marketing tactic
  2. Session marketing tactic
  3. First user marketing tactic

Note: The values of the ‘utm_marketing_tactic’ key is currently not reported in GA4.

What is a tagged URL?

A URL which contains UTM parameters is called a ‘tagged URL’. ‘Tagging a URL’ means adding UTM parameters to it.

Following is an example of a tagged URL:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Another example of a tagged URL:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

However, the following URL is not a tagged URL as it does not contain UTM parameters:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

How to create a tagged URL?

In order to create a tagged URL, you will need to create a query string.

A query string is the part of the URL which comes after the ‘?’ character.

For example, in the URL:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

The query string is:

ThemeId=8904&iPathId=38715

Consider another URL:

https://www.abc.com?gclid=CLjTpNrg8NIC

Here the query string is:

gclid=CLjTpNrg8NIC

Consider another URL:

https://www.google-analytics.com/collect?v=1&tid=UA-123456-2&cid=36009a59-2a05-49e7-b826-2b884d0f935b&t=pageview&dp=%2Fhome

Here the query string is:

v=1&tid=UA-123456-2&cid=36009a59-2a05-49e7-b826-2b884d0f935b&t=pageview&dp=%2Fhome

Consider another URL:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here the query string is:

utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

The query string is made up of one or more parameters and each parameter is made up of ‘key=value’ pair.

For example, in the URL:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

The query string is:

ThemeId=8904&iPathId=38715

This query string is made up of the following two parameters:

  • ThemeId=8904
  • iPathId=38715

The parameter ‘ThemeId=8904’ is made up of the key called ‘ThemeId’ and the value called ‘8904’

Similarly,

The parameter ‘iPathId=38715’ is made up of the key called ‘iPathId’ and the value called ‘38715’

Consider another URL:

https://www.google-analytics.com/collect?v=1&tid=UA-123456-2&cid=36009a59-2a05-49e7-b826-2b884d0f935b&t=pageview&dp=%2Fhome

Here the URL is made up of the following five parameters:

  1. v=1
  2. tid=UA-123456-2
  3. cid=36009a59-2a05-49e7-b826-2b884d0f935b
  4. t=pageview
  5. dp=%2Fhome

The parameter ‘v=1’ is made up of the key called ‘v’ and the value called ‘1’

Similarly,

The parameter ‘tid=UA-123456-2’ is made up of the key called ‘tid’ and the value called ‘UA-123456-2’

Consider another URL:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here the query string is:

utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

This query string is made up of the following five UTM parameters:

  1. utm_source=bing
  2. utm_medium=ppc
  3. utm_term=car-insurance
  4. utm_content=text-ad
  5. utm_campaign=car-insurance-promo-feb

Here, the variable ‘utm_source=bing’ is made up of the key called ‘utm_source’ and the value called ‘bing’

Similarly, the variable ‘utm_medium=ppc’ is made up of the key called ‘utm_medium’ and the value called ‘ppc’

Consider another URL:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Here the query string is:

ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

This query string is made up of the following seven parameters:

  1. ThemeId=8904
  2. iPathId=38715
  3. utm_source=bing
  4. utm_medium=ppc
  5. utm_term=car-insurance
  6. utm_content=text-ad
  7. utm_campaign=car-insurance-promo-feb

Out of these seven parameters, the following five are UTM parameters:

  1. utm_source=bing
  2. utm_medium=ppc
  3. utm_term=car-insurance
  4. utm_content=text-ad
  5. utm_campaign=car-insurance-promo-feb

In a URL two or more parameters are separated via the ampersand sign ‘&’.

That’s why you see the ‘&’ after every parameter in the URL below:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Not all URL parameters are the same.

There are two different types of URL parameters:

  1. Dynamic URL parameters
  2. Campaign tracking parameters

What are dynamic URL parameters?

Dynamic URL Parameters are the parameters which are dynamically added to your web page URL (by your web server) during runtime/page load so that the page renders correctly.

If you remove one of these parameters, then your web page may not display and/or function correctly.

URLs which contain dynamic parameters are called dynamic URLs.

A web page which has got dynamic URL is auto-generated during run time. That is why such web pages are also called ‘dynamic web pages’.

Following is an example of a URL which contains dynamic parameters:

https://www.amazon.com/gp/product/B01LT80TN4/ref=s9u_simh_gw_i3?ie=UTF8&fpl=fresh&
pd_rd_i=B01LT80TN4&pd_rd_r=38GB3XMHBJ1RGP0EKPT0
&pd_rd_w=0kCGp&pd_rd_wg=xY0dy&pf_rd_m=ATVPDKIKX0DER&pf_rd_s=
&pf_rd_r=VVTMWVTJ&pf_rd_t=36701&pf_rd_p=1cf9d009-59436&pf_rd_i=desktop

It is not really hard to identify URLs which contain dynamic parameters. They are usually abnormally long and contain characters like %, ?, &, + etc.

What are campaign tracking parameters?

Campaign Tracking Parameters are the parameters that are used to pass additional information about a click via a URL.

Depending upon the platform being used, there can be different types of campaign tracking parameters.

For example, the campaign tracking parameters recognized by Google fall into two categories:

  1. UTM parameters (commonly used for tracking non-google ads campaigns)
  2. GCLID parameters (commonly used for tracking google ads campaigns)

Quick recap of parameters

Following is an example of a URL:

https://www.abc.com/

Following is an example of a URL with dynamic parameters:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

Following is an example of a URL with UTM parameters:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Following is an example of a URL with both dynamic parameters and UTM parameters:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Note (1): A URL which contains both dynamic and UTM parameters is still considered a ‘custom campaign’. As long as the UTM parameters have been added to the URL, the URL is a custom campaign.

Note (2): You can hide UTM parameters from a URL and can still use the UTM parameters in the background. The simplest way to do that is to use a URL shortener tool like bit.ly or use the ‘lookup table‘ in Google Tag Manager.

What is an un-tagged URL?

A URL which does not contain UTM parameters is called an ‘un-tagged URL’.

Following is an example of an un-tagged URL:

https://www.abc.com/

Another example of an un-tagged URL:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

What is an auto-tagged URL?

A URL which contains ‘GCLID’ parameter is called an auto-tagged URL.

GCLID stands for ‘Google Click ID’. It is a unique ID used by Google Analytics to track and display Google Ads clicks in your reports.

The ‘GCLID’ parameters are automatically added to the end of the destination URLs of your Google ads by Google (provided the auto-tagging feature is turned on).

Following is an example of an auto-tagged URL:

https://www.abc.com?gclid=CLjTpNrg8NIC

Another example of an auto-tagged URL:

https://www.abc.com?ThemeId=8904&iPathId=38715&gclid=CLjTpNrg8NIC

Google strongly recommend that you use auto-tagging.

Note: The GCLID parameter is not a UTM parameter though it is used to track the performance of Google Ads campaigns.

What is a manually-tagged URL?

A manually tagged URL is the one which contains campaign tracking parameters but not GCLID parameter.

Following is an example of a manually tagged URL:

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

Another example:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715&utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb

However, the following URLs are not manually tagged URLs:

https://www.abc.com/fold1?ThemeId=8904&iPathId=38715

https://www.abc.com?gclid=CLjTpNrg8NIC

https://www.abc.com?ThemeId=8904&iPathId=38715&gclid=CLjTpNrg8NIC

https://www.abc.com/?utm_source=bing&utm_medium=ppc&utm_term=car-insurance&utm_content=text-ad&utm_campaign=car-insurance-promo-feb&gclid=CLjTpNrg8NIC

We used the words ‘manually tagged’, only in the context of the ‘auto-tagging’ feature of Google Ads.

Tagging a URL means adding tracking parameters to it. You can do this tagging manually or automatically.

When you are not using the auto-tagging feature of Google Ads to tag a URL, you are manually tagging the URL.

Note: Adding UTM parameters via the URL builder tool is also referred to as manual tagging.

Google Analytics Campaign URL builder tool

Google Analytics Campaign URL builder tool

Through the campaign URL builder tool, you can easily and correctly add UTM parameters to the end of your URLs.

This tool works for both UA (Universal Analytics) and GA4. By default, this tool is set to work for GA4.

If you want to use the ‘campaign URL builder’ tool for UA, then you would need to use the toggle button on the top left-hand side:

Google Analytics Campaign URL builder tool toggle button 1

If you want to tag URLs for ads on the Android mobile app then click on the ‘PLAY’ tab to use the ‘Play Campaign URL Builder tool‘:

Play Campaign URL Builder

Note: When you use the URL builder tool to tag a URL, you just need to enter the ‘values’ of your UTM parameters. The ‘keys’ are automatically added by the URL builder.

Follow the steps below to use the Google Analytics Campaign URL builder tool:

Step-1: Navigate to https://ga-dev-tools.appspot.com/campaign-url-builder/

Step-2: Make sure that you are using the correct version of the campaign URL builder tool. So if you are tagging your URLs for GA4, then the toggle button is set to GA4:

ga4 campaign url builder tool

Step-3: Make sure that you are using the campaign URL builder for the web. Use this options only if you are planning to tag URLs for a website:

web campaign url builder tool

Step-4: Enter your website URL in the ‘Website URL’ text box and then enter the values of your UTM parameters one by one:

Google Analytics Campaign URL builder tool how to use it 1

Step-5: Scroll down and then click on the ‘Copy Campaign URL‘ button:

share the generated campaign url

You are less likely to make a mistake while tagging URLs if you use the campaign URL builder tool.  This is the advantage of using this tool.

Note: If you use Google Ads auto-tagging, then you don’t need to use the campaign URL builder tools. The auto-tagging feature will automatically add the GCLID parameter to the end of your ad URLs.

Personally identifiable information and UTM parameters

Following are examples of personally identifiable information (or PII):

  • Names
  • Email address
  • Ip address
  • Phone number
  • House address etc

Google Analytics terms of service, prohibits sending PII to Google Analytics server via UTM tracking parameters.

For example, the following use of UTM parameters is against the Google Analytics terms of service and could result in account suspension:

https://www.abc.com/?utm_source=facebook&utm_medium=1844ESky-HarborCirS-Phoenix-AZ85034-USA&[email protected]&utm_content=82.23.186.447&utm_campaign=car-insurance-promo-feb

pii and utm parameters

The URL above is used to send the house address, email address and IP address of a user to the Google Analytics server and thus violates Google Analytics terms of service.

Where to add the UTM parameters?

We add UTM parameters to external links.

An external link is a URL which when clicked, takes a user from one web page to another web page and both the source and destination web pages are hosted on different websites/domains.

For example, a link from a Facebook ad to a product detail page hosted on your website is an external link.

An internal link is a URL which when clicked, takes a user from one web page to another web page and both the source and destination web pages are hosted on the same website/domain.

For example,

A link from a product category page (hosted on your website) to a product detail page (also hosted on your website) is an internal link.

Similarly,

A link from one of the web pages of your sub-domain (say blog.abc.com) to a page hosted on your primary domain (abc.com) is an internal link.

Unlike GA4, each Universal Analytics session can be attributed to only one traffic source (whether system defined or user defined) at a time.

So if the value of the traffic source changes in the middle of an existing Google Analytics session, it causes the current GA session to end and a new session to start.

Similarly, any change in the value of the following keys triggers a new Google Analytics session:

  1. utm_source
  2. utm_medium
  3. utm_campaign
  4. utm_term
  5. utm_content
  6. gclid

Because of this reason, when you tag an internal link, it could trigger new Google Analytics sessions and thus inflate your session data.

utm tracking tagging internal links

In short, use UTM parameters to tag only external links.

If you are using the auto-tagging feature of Google Ads, then you don’t need to tag the URLs of your ads.

auto tagging google ads

Any traffic source/medium that Google Analytics can automatically detect and report on does not need to be tagged.

For example, GA can automatically detect traffic from all well-known search engines. So you don’t need to tag links for search engines.

Tag an external link only when you want to send some extra information to Google Analytics.

For example, when a user visits your website from Facebook, GA automatically detects the Facebook referrer and ties the user’s activities with the referrer. 

So you don’t need to tag Facebook links just for that purpose.

However, if you want to know exactly which Facebook campaign sent traffic to your website, then tag the Facebook ad URLs.

Note: It is not required that the UTM parameters should remain appended to a URL until the end of a Google Analytics session. They just need to be present when a landing page loads for the first time in a web browser.

Testing UTM parameters

Enter your tagged URL in your web browser address bar and then press the enter key:

utm tracking browser address bar

If all the parameters remain intact, then most likely, your UTM parameters are working correctly.

The other thing that you should do is to check the ‘Real Time’ > ‘Traffic Sources’ report in your GA3 view for custom campaign data:

real time traffic sources

Use the DebugView report, if you want to test UTM parameters in GA4

In the DebugView report, you can view each campaign UTM parameter for a page_view event in real-time.

UTM parameters not working and how to fix them

In the following cases, your UTM parameters won’t work:

#1 Some websites do not support UTM parameters and serve an error page when a UTM parameter is added to a URL. 

You can fix this problem by asking your developer to allow UTM parameters in the URLs.

#2 URL redirects (like 301, 302, HTTP to HTTPS redirects or redirect from desktop to mobile website) can cause the UTM parameters to be dropped from the landing page URLs.

When UTM parameters are dropped, the campaign tracking does not work, and the custom campaign data is not sent to Google Analytics.

You can fix this problem by asking your developer to allow sending UTM parameters along with redirects.

If that is not possible, then tag the destination ad URLs (where a user eventually lands after a redirect).

#3 Sometimes, Google Analytics can not read the values of UTM parameters even when you can see the UTM parameters in the browser address bar.

This can happen when:

  1. Google Analytics Tracking code on the landing page is not valid.
  2. GA tracking code is valid but does not fire for some reason.
  3. Your web server is altering or truncating the UTM parameters.
  4. Your GA reporting view filters do not allow custom campaign data.
  5. GA tracking code is embedded in an IFRAME, and the IFRAME is not a parent frame.

If the GA tracking code is embedded in a child frame, then it can not read the campaign tracking values.

This is because a child frame can not read the address URL of a parent frame. So make sure the GA tracking code is always embedded in the parent frame.

Related Article: How to Fix Missing Campaign Parameters in Google Analytics

#1 Google Analytics 4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. GA4 Migration Guide – Learn to upgrade to GA4 from GA3 via checklist
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the Difference?
  5. GA4 vs GA4 360 – Pricing, Limits, Billing and More
  6. Google Analytics 4 Training & Tutorial with FREE GA4 ebook

#2 Google Analytics 4 Property

  1. Google Analytics Account Hierarchy (Structure Explained)
  2. Understanding Google Analytics Measurement ID (GA4)
  3. Google Signals GA4 – See Demographics (Gender, Age) in Google Analytics 4
  4. Using the GA4 (Google Analytics 4) Test Property
  5. Google Analytics 4 Sub Properties Tutorial
  6. Roll up Property in Google Analytics 4 (GA4) – Tutorial

#3 Google Analytics 4 Integrations

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. How to link Google Search Console to Google Analytics 4 (GA4)
  4. How to Install Google Analytics 4 on Shopify
  5. GA4 Firebase Integration – Correctly Add App Data Streams to GA4 Property

#4 Google Analytics 4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. Understanding Event Parameters in Google Analytics 4 (GA4)
  3. Recommended Events in Google Analytics 4 (GA4)
  4. Enhanced Measurement Events in Google Analytics 4 (GA4)
  5. Automatically Collected Events in Google Analytics 4 (GA4)
  6. How to Set Up GA4 Custom Events via Google Tag Manager
  7. Events Report in Google Analytics 4 (GA4)
  8. How to Rename Events in Google Analytics 4 (GA4)
  9. How to Use Google Analytics 4 Event Builder
  10. GA4 Form Interactions Tracking – Enhanced Measurement

#5 Google Analytics 4 Conversions

  1. Google Analytics 4 Conversion Tracking Guide – GA4 Goals
  2. How to Import Conversions from GA4 Property to Your Google Ads account
  3. GA4 Conversion Rate – How to find it and use it

#6 Google Analytics 4 Dimensions

  1. GA4 (Google Analytics 4) Dimensions Tutorial
  2. GA4 (Google Analytics 4) Custom Dimensions Tutorial
  3. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  4. Event Scoped Custom Dimensions in GA4 – Tutorial

#7 Google Analytics 4 Metrics

  1. GA4 (Google Analytics 4) Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 (Google Analytics 4) Custom Metrics Tutorial
  3. What are Predictive Metrics in Google Analytics 4 (GA4)

#8 Google Analytics 4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#9 Google Analytics 4 Specialized Tracking

  1. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  2. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  3. GA4 Site Search – Tracking Site Search in Google Analytics 4
  4. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 (Google Analytics 4) Data Import Tutorial
  7. Google Analytics 4 Content Grouping – Create Content Groups in GA4
  8. How to Track Single Page Apps in Google Analytics 4 (GA4)
  9. utm_source, utm_medium, utm_campaign Parameters – GA4 (Google Analytics 4)
  10. GA4 Form Tracking via Google Tag Manager

#10 Google Analytics 4 filters

  1. GA4 filters – Understanding Data Filters in Google Analytics 4
  2. How to Create and Test Filters in Google Analytics 4 (GA4)?
  3. Exclude Internal Traffic in GA4 (Google Analytics 4) via IP Filter

#11 Google Analytics 4 Explorations

  1. Free Form Report in GA4 (Google Analytics 4) – Exploration Report
  2. How to Use the User Lifetime Report in Google Analytics 4 (GA4)
  3. How to Use Path Exploration Report in GA4 (Google Analytics 4) – Path Analysis
  4. How to Use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to Use the Funnel Exploration Report in GA4 (Google Analytics 4) – Funnel Analysis
  6. Cohort Exploration Report in Google Analytics 4 (GA4)
  7. How to Create Landing Pages Report in GA4 (Google Analytics 4)
  8. How to Create Google Ads report in GA4 (Google Analytics 4)
  9. How to Segment GA4 Data by Data Stream
  10. Organic Search Traffic Analysis in GA4 – Complete Guide
  11. Google Analytics 4 (GA4) Outbound Links Tracking
  12. How to Track Email Campaigns and Traffic in GA4 
  13. How to view full page URLs in GA4?

#12 Google Analytics 4 Advanced

  1. Understanding Google Analytics 4 Sessions
  2. GA4 (Google Analytics 4) Measurement Protocol Tutorial
  3. How to Build Comparisons (Advanced Segments) in Google Analytics 4 (GA4)
  4. Understanding Automated Insights in Google Analytics 4 (GA4)
  5. Understanding Channel Groupings in Google Analytics 4 (GA4)
  6. Understanding Data Sampling in Google Analytics 4 (GA4)
  7. Google Analytics 4 Regex (Regular Expressions) Tutorial
  8. Google analytics 4 GDPR compliance checklist
  9. How to Exclude URL Query Parameters in Google Analytics 4

#13 Google Analytics 4 Reports

  1. How to Create Custom Insights in Google Analytics 4 (GA4)
  2. How to Use Debug View Report in Google Analytics 4 (GA4)

#14 Google Analytics 4 Attribution

  1. Guide to Attribution Models in GA4 (Google Analytics 4)
  2. How to Change Attribution Models in GA4 (Google Analytics 4)?
  3. GA4 (Google Analytics 4) Conversion Paths Report in Attribution
  4. GA4 (Google Analytics 4) Model Comparison Report in Attribution
  5. Advertising Snapshot in GA4 (Google Analytics 4) Attribution
  6. GA4 Attribution Modelling Tutorial

#15 Google Analytics 4 Audiences

  1. GA4 Audiences – Creating Custom Audience in Google Analytics 4
  2. How to Create a Remarketing Audience in Google Analytics 4 (GA4)
  3. Understanding Audience Triggers in Google Analytics 4 (GA4)
  4. Google Analytics 4 (GA4) Predictive Audiences – Tutorial

#16 Google Analytics 4 BigQuery

  1. GA4 BigQuery – Connect Google Analytics 4 with BigQuery
  2. BigQuery GA4 Schema – Send Custom GA4 Data to BigQuery
  3. How to Backfill GA4 Data in BigQuery
  4. How to Connect and Export Data from GA4 to BigQuery

Frequently asked questions about UTM parameters

What does UTM stand for in Google Analytics?

‘UTM’ stands for ‘Urchin tracking module.’

What are UTM codes?

UTM codes (or UTM parameters) are the parameters recognized by Google for sending detailed information about your marketing campaigns to Google Analytics. Following are examples of UTM codes:
1) utm_source=some-value
2) utm_medium=some-value
3) utm_campaign=some-value
4) utm_term=some-value
5) utm_content=some-value

Where do I put the UTM code?

Append the UTM codes to an external link.

How to create UTM codes in Google Analytics?

You can UTM codes in Google Analytics by using the Google Analytics Campaign URL builder tool.

What is UTM in Google Ads?

In Google Ads (Adwords), we use the auto-tagging feature to tag URLs.

How do I set up automatic tagging in Google Ads?

You can set up automatic tagging in Google Ads (Adwords) by enabling the auto-tagging feature.

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade

Learn and Master Google Analytics 4 (GA4) - 126 pages ebook

X
error: Alert: Content is protected !!