GA4 UTM parameters not working? Here is how to fix it.
GA4 often relies on UTM tracking parameters to identify traffic sources, mediums, and campaigns. So use it wherever you can.
In the following cases, your UTM parameters won’t work:
- You are using a UTM parameter that is not supported by GA4.
- UTM parameters are not formatted correctly.
- UTM parameters are not appended to the URL correctly.
- GA4 is not able to capture the UTM parameters.
- UTM parameters do not strictly follow the channel rules for manual traffic.
- You are tagging internal links.
- UTM parameters are not automatically sent with server-side GTM events.
#1 You are using a UTM parameter that is not supported by GA4.
GA4 supports only the following UTM parameters
- utm_id.
- utm_source.
- utm_medium.
- utm_campaign.
- utm_term.
- utm_content.
- utm_source_platform.
- utm_campaign_id.
- utm_creative_format.
- utm_marketing_tactic.
Any UTM parameter that is not supported by GA4 will be ignored.
This is because GA4 does not know how to process these parameters.
#2 UTM parameters are not formatted correctly.
For example, you may be using ‘utm-source’ instead of ‘utm_source’. Or there could be a spelling mistake in the parameter name like ‘utm_surce’.
UTM parameters are case-sensitive in GA4.
This means that “utm_source=google” and “utm_source=Google” are treated as two different parameters.
The best practice is to use all lowercase for UTM parameters and values. Using lowercase will ensure that your parameters are consistent and easy to read.
Use the Google Analytics Campaign URL builder tool to avoid formatting mistakes while tagging the URLs.
Get weekly practical tips on GA4 and/or BigQuery to accurately track and read your analytics data.
#3 UTM parameters are not appended to the URL correctly.
Example-1:
https://www.example.com/?utm_source=googleutm_medium=cpcutm_campaign=spring_sale
In this example, the ‘&’ symbol is missing between the UTM parameters, which will result in incorrect tracking as it will prevent GA4 from properly parsing the parameters.
With the ‘&’ symbol correctly separating each UTM parameter, GA4 will be able to accurately interpret and log each UTM parameter.
Example-2:
https://www.example.com/?utm_source=google &utm_medium=cpc&utm_campaign=spring_sale
In this example, there is a space between “google” and “&”, which could cause issues with tracking.
The space character breaks the URL, and as a consequence, only the “utm_source=google” parameter would be correctly parsed, while the remaining part might not be recognized as part of the URL parameters.
By removing the extra space, all the UTM parameters are correctly formatted and should be properly tracked by GA4.
Example-3:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring sale
The space in “spring sale” is an invalid character in a URL and should be encoded (e.g., replaced with %20 or +).
In a URL, a space is not a valid character and should be encoded to ensure that the URL is correctly parsed and tracked.
In the case of UTM parameters, this is particularly important to ensure accurate tracking of campaign data.
Example-4:
https://www.example.com/?utm_source=Google&utm_medium=CPC&utm_campaign=spring_sale
UTM parameters are case-sensitive, so “Google” is different from “google” and “CPC” is different from “cpc”. This inconsistency can lead to inaccurate data grouping.
If you use different cases for the same UTM parameter, GA4 will treat them as different parameters.
This can lead to your data being grouped incorrectly, which can make it difficult to track the performance of your marketing campaigns accurately.
For example, if you use both “Google” and “google” as the utm_source
parameter, GA4 will treat them as two different sources. This will make it difficult to track how much traffic you are getting from Google overall.
To avoid this problem, you should use consistent casing for all of your UTM parameters.
It is generally recommended to use all lowercase for UTM parameters and values.
Example-5:
https://www.example.com/utm_source=google&utm_medium=cpc&utm_campaign=spring_sale
The ‘?’ character is missing before the first UTM parameter, making the URL invalid for tracking purposes.
A valid URL with UTM parameters should start with a ? character.
This tells the server that the URL contains parameters.
The parameters are then separated by ampersands (&).
If the ‘?’ character is missing, the server will not be able to distinguish between the page name and the parameters.
This can lead to the URL being parsed incorrectly, and the parameters will not be tracked.
It is important to note that the ? character is only required for the first parameter.
Any subsequent parameters can be separated by ampersands (&).
Example-6:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring&summer_sale
In this example, the & character within the campaign name “spring&summer_sale” should be percent-encoded as ‘%26’ to avoid confusion with the parameter separator.
When you create a URL with UTM parameters, each parameter is separated by an ampersand (&).
This tells the server that there are multiple parameters in the URL.
However, if you have a parameter value that contains an ampersand, the server will not be able to distinguish between the parameter separator and the ampersand in the parameter value.
This can lead to the URL being parsed incorrectly.
To avoid this problem, you should percent-encode any ampersands in your parameter values.
This means that you should replace the ampersand with the code ‘%26’.
Example-7: Duplicate UTM parameters in a URL.
In GA4, when there are duplicate UTM parameters in a URL, GA4 will use the value from the last occurrence of the duplicate parameter.
For example:
https://www.example.com/?utm_source=facebook&utm_medium=social&utm_source=instagram
In GA4, this will be recorded as:
Source: Instagram
Medium: social
This behaviour applies to all UTM parameters, including ‘utm_medium’, ‘utm_campaign’, ‘utm_content’, and ‘utm_term’.
Another Example:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_medium=paid_search
In GA4, this will be recorded as:
Source: google
Medium: paid_search
Another Example:
https://www.example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=summer
&utm_source=referral&utm_medium=banner&utm_campaign=fall
In GA4, this will be recorded as:
Source: referral
Medium: banner
Campaign: fall
GA4 uses the last occurrence of each UTM parameter.
#4 GA4 is not able to capture the UTM parameters.
Sometimes, GA4 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:
- If the GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser.
- The landing page(s) are missing the GA4 tracking code (aka Google Tag).
- GA4 Tracking code on the landing page is not valid.
- GA4 tracking code is valid but does not fire for some reason.
- Your web server is altering or truncating the UTM parameters.
- GA4 tracking code is embedded in an IFRAME, and the IFRAME is not a parent frame.
- URL redirects cause the UTM parameters to be dropped.
- Ad blockers and privacy extensions can prevent UTM parameters from being sent.
- Ad blockers and privacy extensions can alter UTM parameters.
- You are using a cookie consent banner.
- UTM parameters are included in the fragment portion of the URLs.
#4.1 GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser.
If the GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser, there is a risk that the UTM parameters might not be captured for that session.
To avoid this problem, it is important to fire the GA4 configuration tag as early as possible, ideally before the page has loaded.
The best possible trigger for firing the GA4 configuration tag is the ‘Initialization-All Pages’ trigger.
This trigger is designed to fire before any other triggers, ensuring the GA4 configuration tag is executed as early as possible when a page loads.
#4.2 The landing page(s) are missing the GA4 tracking code (aka Google Tag).
When the landing page(s) are missing the GA4 tracking code (also known as the Google tag), it directly impacts the ability to capture and record UTM parameters.
The GA4 tracking code contains the JavaScript necessary to read the URL of a page, including any UTM parameters present.
Without this code present on a landing page, there’s no mechanism to extract the UTM information from the URL.
Even if a user arrives at the landing page via a correctly tagged URL with UTM parameters, GA4 won’t be able to attribute this traffic to the correct source, medium, or campaign without the tracking code present.
If subsequent pages have the GA4 tracking code but the landing page doesn’t, the initial source information (including UTMs) is lost, leading to inaccurate attribution for the entire user session.
Make sure all pages on your website contain a valid GA4 tracking code.
For more information, check this article: Some of your pages are not tagged in GTM/GA4 [Fixed].
#4.3 GA4 Tracking code on the landing page is not valid.
Suppose the GA4 tracking code (configuration tag) on the landing page is invalid or poorly implemented.
In that case, GA4 may be unable to capture the UTM parameter values even if they are visible in the browser address bar.
#4.4 GA4 tracking code is valid but does not fire for some reason.
Even with a valid GA4 tracking code, there could be instances where it does not fire correctly, preventing the capturing of UTM parameters from the URL.
This scenario can occur due to a variety of reasons.
For example,
1) If the conditions set for the GA4 tag to fire in GTM are too restrictive or incorrectly configured, the tag may not fire on the intended pages.
2) If your web server modifies, truncates, or strips the UTM parameters from the URL before the GA4 tracking code has a chance to read them, this will lead to GA4 not capturing the values of UTM parameters.
3) Your web server might be set up to rewrite URLs for various reasons, such as SEO-friendly URLs or to enforce certain URL structures. If not configured properly, this could lead to the loss of UTM parameters.
4) Some server-side scripts or applications might modify the URL and not preserve the original UTM parameters.
5) Certain security configurations or firewalls might alter or strip query parameters deemed unnecessary or potentially harmful.
6) Slow network conditions or connectivity issues can delay or prevent the loading and execution of tracking scripts like the ‘GA4 Configuration’ tag.
7) If a user navigates away from the page before it fully loads, the GA4 configuration tag may not have a chance to fire.
8) If other tags are firing before the GA4 configuration tag and causing disruptions or alterations to the URL, it might affect the GA4 tag’s ability to capture UTM parameters.
9) Browser extensions that block ads and trackers can prevent the GA4 tag from firing, thus impeding the collection of UTM parameter data.
10) JavaScript errors on the webpage can interfere with the execution of the GA4 tracking code, causing it not to fire even if it’s correctly implemented.
To address these issues, you must work with your IT team to ensure your web server is configured to preserve UTM parameters during rewrites or other server-side operations.
#4.5 Your web server is altering or truncating the UTM parameters.
Your web server may have certain configurations or limitations that can cause it to truncate URLs after a certain length.
If UTM parameters are included towards the end of a long URL, they may be cut off, leading to incomplete or missing data in GA4.
Example:
Original URL: https://example.com/product-page?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale&utm_content=ad_variant_A
Truncated URL: https://example.com/product-page?utm_source=google&utm_medium=cpc&utm_camp
The ‘utm_campaign’ and ‘utm_content’ parameters are truncated in this case.
As a result, GA4 might only capture partial or incorrect UTM data, making it difficult to determine which specific campaign or ad variant led to the visit.
In the worst case, your web server may be configured to strip the UTM parameters completely from your URLs.
#4.6 GA4 tracking code is embedded in an IFRAME, and the IFRAME is not a parent frame.
If the GA4 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 GA4 tracking code is always embedded in the parent frame.
Suppose it’s necessary for the tracking code to be within an iframe.
In that case, your developer will need to implement solutions to pass the UTM parameter data from the parent frame to the child iframe.
This might involve using JavaScript to communicate between frames or server-side solutions to propagate the parameters to the iframe’s URL.
Related article: How to use GA4 with iframe.
#4.7 URL redirects cause the UTM parameters to be dropped.
URL redirects, such as 301 (permanent), 302 (temporary), HTTP to HTTPS, or desktop-to-mobile site redirects, can sometimes result in the loss of UTM parameters appended to the URL.
When these parameters are lost during the redirection, GA4 cannot capture the campaign information, leading to inaccurate or incomplete campaign tracking data.
Work with your development team to modify how redirects are handled, ensuring that UTM parameters are preserved during the redirect process.
This often involves configuring the server to retain the original query string (containing the UTM parameters) and append it to the redirected URL.
If modifying the redirects is not feasible, another approach is to ensure that the final landing page URLs (the destination after any redirects) are tagged with the necessary UTM parameters.
This ensures that, despite any redirects, the UTM parameters remain in the final URL that loads in the user’s browser, allowing GA4 to capture the campaign data.
Related Article: How to see UTM parameters in GA4 (Google Analytics 4).
#4.8 Ad blockers and privacy extensions can prevent UTM parameters from being sent.
Ad blockers and privacy extensions can prevent UTM parameters from being sent to GA4 even if you can see them in the browser address bar.
As a result, the UTM parameters won’t be captured or recorded by GA4.
Some ad blockers can even strip UTM parameters from URLs, making it impossible for GA4 to track the source and medium of the traffic.
Example:
Original URL: https://example.com/?utm_source=linkedin&utm_medium=social&utm_campaign=winter_promo
Modified by Ad blocker: https://example.com/
#4.9 Ad blockers and privacy extensions can alter UTM parameters.
Some privacy extensions might modify the data sent via UTM parameters to GA4.
For example, a privacy extension might replace the UTM parameter values with generic or hashed values to protect user privacy.
Original URL: https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
Modified by Extension: https://example.com/?utm_source=anonymized&utm_medium=anonymized&utm_campaign=anonymized
In this case, instead of receiving the specific values of the UTM parameters, GA4 would receive “anonymized” as the value for all UTM parameters, rendering the data meaningless for tracking purposes.
#4.10 You are using a cookie consent banner.
In GA4, UTM parameters won’t collect any data in the consent denied state, and they may also not collect any data if consent is subsequently granted.
If consent is subsequently granted after the page has already loaded, the UTM parameters from that initial page load will not be captured retroactively.
Consider the following scenario.
A user clicks on a Facebook ad with UTM parameters in the URL and, as soon as he lands on the page, sees a consent banner.
He clicks on ‘agree’ to accept cookie consent, but the UTM parameters still do not send any data to GA4.
If you manually tag the URLs of your Google Ads, the same thing could happen with Google Ads, too.
When a user lands on your page with UTM parameters in the URL, you can use JavaScript to store these parameters in a cookie immediately.
This storage happens even before consent is granted, ensuring the data is preserved.
UTM parameters are not directly related to user consent for data collection.
So you can store them even before the consent is granted.
Once the consent is granted, retrieve the UTM parameters from the cookie and send them to GA4.
If the consent is not granted, GA4 won’t collect any data from UTM parameters.
Cookies allow UTM parameters to persist across multiple pages and sessions, which is crucial if users navigate away from the landing page before granting consent.
#4.11 UTM parameters are included in the fragment portion of the URLs.
UTM parameters should be placed in the query string (the part of the URL after the ‘?’) so that GA4 captures them correctly.
If UTM parameters are placed in the fragment (the part of the URL following a #), GA4 does not capture them.
Example:
Correct:
https://example.com/page?utm_source=google&utm_medium=organic&utm_campaign=example_campaign
Incorrect:
https://example.com/page#utm_source=google&utm_medium=organic&utm_campaign=example_campaign
#5 UTM parameters do not strictly follow the channel rules for manual traffic.
Google published a set of rules (checklist) for GA4 UTM tracking, but most people continue to ignore this checklist and tag URLs however they please.
Then, they complain about the unassigned traffic appearing in their reports.
Unassigned traffic in GA4 refers to the website traffic that is not attributed to any one of the following default channel groups:
- Affiliates
- Audio
- Cross-network
- Direct
- Display
- Email
- Mobile Push Notifications
- Organic Search
- Organic Shopping
- Organic Social
- Organic Video
- Paid Other
- Paid Search
- Paid Shopping
- Paid Social
- Paid Video
- Referral
- SMS
Google uses certain rules (called ‘channel rules‘) to group similar website traffic sources (usually that all belong to the same traffic medium).
For example,
Consider the following traffic sources:
google (as in google / organic)
yahoo (as in yahoo / organic)
bing (as in bing / organic)
aol (as in aol / organic), etc.
Since they all have the same traffic medium, ‘organic’, they will be grouped together under the channel group ‘organic search’.
Google does not have any pre-defined channel rules to group traffic sources that have either user-defined sources and mediums or they are (not set).
So what it will do is group these traffic sources under the ‘unassigned’ channel group.
Your UTM parameters should strictly follow the channel rules for manual traffic (check the screenshot below) wherever you can so that your website traffic is attributed to one of Google‘s default channel groups.
For example, consider the following URL of a Facebook ad:
https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=fb-ad&utm_campaign=pdf-book-campaign&utm_content=ad1
Here, ‘fb-ad’ is not a system-defined traffic medium.
So Google will label all the website traffic from this URL under the ‘unassigned’ channel group.
But this is not what you want. You want this traffic to be grouped under the ‘paidsocial‘ channel.
To do that, rewrite the UTM parameters like the one below:
https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=paid&utm_campaign=pdf-book-campaign&utm_content=ad1
Here, paid is a system-defined traffic medium.
So Google will now label all the website traffic from this URL under the ‘Paid Social‘ channel group:
You can use utmprep.com tool to create UTM parameters that strictly follow the ga4 default channel rules.
Use system-defined traffic sources and system-defined traffic mediums wherever possible.
A system-defined source is one that is already defined/recognized by GA4 as a traffic source.
Similarly, a system-defined medium is one that is already defined/recognized by GA4 as a traffic medium.
The more user-defined traffic sources and/or medium you will use, the higher will be the unassigned website traffic in GA4.
Memorize channel rules and definitions for accurate tagging.
It is very important to know how Google groups similar traffic sources and how it defines a particular marketing channel.
This knowledge will help you tremendously in tagging URLs that follow GA4 default channel rules.
Share this information with all those who tag URLs in your organization. Everybody needs to be on the same page.
#6 You are tagging internal links.
GA4 does not give you the liberty to tag internal links.
UTM parameters on internal links can override the original source/medium data.
For example,
If a user initially came to your website through a Google search (organic) and then clicked on an internal link with UTM parameters, the source/medium might be reported as the parameters set on the internal link rather than Google.
This can distort your understanding of where your traffic is coming from.
Therefore, it is recommended to avoid using UTM parameters on internal links to maintain the accuracy of source/medium attribution.
Instead, consider using other tracking mechanisms like events to track internal navigation while preserving the original source/medium data.
#7 UTM parameters are not automatically sent with server-side GTM events.
To send UTM parameters server-side in GTM, you need to capture them client-side first and then pass them to your server.
#1 Use client-side GTM to create URL variables for each UTM parameter:
- Create a URL variable for utm_source.
- Create a URL variable for utm_medium.
- Create a URL variable for utm_campaign.
- Create variables for any other UTM parameters you want to track
#2 Create a custom HTML tag in client-side GTM to send the UTM data to your server:
<script>
(function() {
var utmParams = {
utm_source: '{{URL - utm_source}}',
utm_medium: '{{URL - utm_medium}}',
utm_campaign: '{{URL - utm_campaign}}'
};
// Send UTM data to server
fetch('/your-server-endpoint', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(utmParams)
});
})();
</script>
#3 In your server-side GTM container, create a custom variable to access the UTM data sent from the client:
Variable Type: Event Data
Event Data Key: the key you used when sending data from client-side
You can now use these server-side variables in your server-side tags to include UTM data in your server-side tracking.
By following these steps, you will be able to capture UTM parameters client-side and then pass them to your server-side GTM setup for further processing and tracking.
#8 You use both auto-tagging and manual tagging to tag URLs.
If you use manual tagging and auto-tagging together, then the source, medium, and other traffic classification dimensions use the auto-tagged values.
Only the ‘utm_content’ and ‘utm_term’ values from your manual tagging will be used.
GA4 often relies on UTM tracking parameters to identify traffic sources, mediums, and campaigns. So use it wherever you can.
In the following cases, your UTM parameters won’t work:
- You are using a UTM parameter that is not supported by GA4.
- UTM parameters are not formatted correctly.
- UTM parameters are not appended to the URL correctly.
- GA4 is not able to capture the UTM parameters.
- UTM parameters do not strictly follow the channel rules for manual traffic.
- You are tagging internal links.
- UTM parameters are not automatically sent with server-side GTM events.
#1 You are using a UTM parameter that is not supported by GA4.
GA4 supports only the following UTM parameters
- utm_id.
- utm_source.
- utm_medium.
- utm_campaign.
- utm_term.
- utm_content.
- utm_source_platform.
- utm_campaign_id.
- utm_creative_format.
- utm_marketing_tactic.
Any UTM parameter that is not supported by GA4 will be ignored.
This is because GA4 does not know how to process these parameters.
#2 UTM parameters are not formatted correctly.
For example, you may be using ‘utm-source’ instead of ‘utm_source’. Or there could be a spelling mistake in the parameter name like ‘utm_surce’.
UTM parameters are case-sensitive in GA4.
This means that “utm_source=google” and “utm_source=Google” are treated as two different parameters.
The best practice is to use all lowercase for UTM parameters and values. Using lowercase will ensure that your parameters are consistent and easy to read.
Use the Google Analytics Campaign URL builder tool to avoid formatting mistakes while tagging the URLs.
#3 UTM parameters are not appended to the URL correctly.
Example-1:
https://www.example.com/?utm_source=googleutm_medium=cpcutm_campaign=spring_sale
In this example, the ‘&’ symbol is missing between the UTM parameters, which will result in incorrect tracking as it will prevent GA4 from properly parsing the parameters.
With the ‘&’ symbol correctly separating each UTM parameter, GA4 will be able to accurately interpret and log each UTM parameter.
Example-2:
https://www.example.com/?utm_source=google &utm_medium=cpc&utm_campaign=spring_sale
In this example, there is a space between “google” and “&”, which could cause issues with tracking.
The space character breaks the URL, and as a consequence, only the “utm_source=google” parameter would be correctly parsed, while the remaining part might not be recognized as part of the URL parameters.
By removing the extra space, all the UTM parameters are correctly formatted and should be properly tracked by GA4.
Example-3:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring sale
The space in “spring sale” is an invalid character in a URL and should be encoded (e.g., replaced with %20 or +).
In a URL, a space is not a valid character and should be encoded to ensure that the URL is correctly parsed and tracked.
In the case of UTM parameters, this is particularly important to ensure accurate tracking of campaign data.
Example-4:
https://www.example.com/?utm_source=Google&utm_medium=CPC&utm_campaign=spring_sale
UTM parameters are case-sensitive, so “Google” is different from “google” and “CPC” is different from “cpc”. This inconsistency can lead to inaccurate data grouping.
If you use different cases for the same UTM parameter, GA4 will treat them as different parameters.
This can lead to your data being grouped incorrectly, which can make it difficult to track the performance of your marketing campaigns accurately.
For example, if you use both “Google” and “google” as the utm_source
parameter, GA4 will treat them as two different sources. This will make it difficult to track how much traffic you are getting from Google overall.
To avoid this problem, you should use consistent casing for all of your UTM parameters.
It is generally recommended to use all lowercase for UTM parameters and values.
Example-5:
https://www.example.com/utm_source=google&utm_medium=cpc&utm_campaign=spring_sale
The ‘?’ character is missing before the first UTM parameter, making the URL invalid for tracking purposes.
A valid URL with UTM parameters should start with a ? character.
This tells the server that the URL contains parameters.
The parameters are then separated by ampersands (&).
If the ‘?’ character is missing, the server will not be able to distinguish between the page name and the parameters.
This can lead to the URL being parsed incorrectly, and the parameters will not be tracked.
It is important to note that the ? character is only required for the first parameter.
Any subsequent parameters can be separated by ampersands (&).
Example-6:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring&summer_sale
In this example, the & character within the campaign name “spring&summer_sale” should be percent-encoded as ‘%26’ to avoid confusion with the parameter separator.
When you create a URL with UTM parameters, each parameter is separated by an ampersand (&).
This tells the server that there are multiple parameters in the URL.
However, if you have a parameter value that contains an ampersand, the server will not be able to distinguish between the parameter separator and the ampersand in the parameter value.
This can lead to the URL being parsed incorrectly.
To avoid this problem, you should percent-encode any ampersands in your parameter values.
This means that you should replace the ampersand with the code ‘%26’.
Example-7: Duplicate UTM parameters in a URL.
In GA4, when there are duplicate UTM parameters in a URL, GA4 will use the value from the last occurrence of the duplicate parameter.
For example:
https://www.example.com/?utm_source=facebook&utm_medium=social&utm_source=instagram
In GA4, this will be recorded as:
Source: Instagram
Medium: social
This behaviour applies to all UTM parameters, including ‘utm_medium’, ‘utm_campaign’, ‘utm_content’, and ‘utm_term’.
Another Example:
https://www.example.com/?utm_source=google&utm_medium=cpc&utm_medium=paid_search
In GA4, this will be recorded as:
Source: google
Medium: paid_search
Another Example:
https://www.example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=summer
&utm_source=referral&utm_medium=banner&utm_campaign=fall
In GA4, this will be recorded as:
Source: referral
Medium: banner
Campaign: fall
GA4 uses the last occurrence of each UTM parameter.
#4 GA4 is not able to capture the UTM parameters.
Sometimes, GA4 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:
- If the GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser.
- The landing page(s) are missing the GA4 tracking code (aka Google Tag).
- GA4 Tracking code on the landing page is not valid.
- GA4 tracking code is valid but does not fire for some reason.
- Your web server is altering or truncating the UTM parameters.
- GA4 tracking code is embedded in an IFRAME, and the IFRAME is not a parent frame.
- URL redirects cause the UTM parameters to be dropped.
- Ad blockers and privacy extensions can prevent UTM parameters from being sent.
- Ad blockers and privacy extensions can alter UTM parameters.
- You are using a cookie consent banner.
- UTM parameters are included in the fragment portion of the URLs.
#4.1 GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser.
If the GA4 configuration tag is fired after the URL with UTM parameters is loaded into the browser, there is a risk that the UTM parameters might not be captured for that session.
To avoid this problem, it is important to fire the GA4 configuration tag as early as possible, ideally before the page has loaded.
The best possible trigger for firing the GA4 configuration tag is the ‘Initialization-All Pages’ trigger.
This trigger is designed to fire before any other triggers, ensuring the GA4 configuration tag is executed as early as possible when a page loads.
#4.2 The landing page(s) are missing the GA4 tracking code (aka Google Tag).
When the landing page(s) are missing the GA4 tracking code (also known as the Google tag), it directly impacts the ability to capture and record UTM parameters.
The GA4 tracking code contains the JavaScript necessary to read the URL of a page, including any UTM parameters present.
Without this code present on a landing page, there’s no mechanism to extract the UTM information from the URL.
Even if a user arrives at the landing page via a correctly tagged URL with UTM parameters, GA4 won’t be able to attribute this traffic to the correct source, medium, or campaign without the tracking code present.
If subsequent pages have the GA4 tracking code but the landing page doesn’t, the initial source information (including UTMs) is lost, leading to inaccurate attribution for the entire user session.
Make sure all pages on your website contain a valid GA4 tracking code.
For more information, check this article: Some of your pages are not tagged in GTM/GA4 [Fixed].
#4.3 GA4 Tracking code on the landing page is not valid.
Suppose the GA4 tracking code (configuration tag) on the landing page is invalid or poorly implemented.
In that case, GA4 may be unable to capture the UTM parameter values even if they are visible in the browser address bar.
#4.4 GA4 tracking code is valid but does not fire for some reason.
Even with a valid GA4 tracking code, there could be instances where it does not fire correctly, preventing the capturing of UTM parameters from the URL.
This scenario can occur due to a variety of reasons.
For example,
1) If the conditions set for the GA4 tag to fire in GTM are too restrictive or incorrectly configured, the tag may not fire on the intended pages.
2) If your web server modifies, truncates, or strips the UTM parameters from the URL before the GA4 tracking code has a chance to read them, this will lead to GA4 not capturing the values of UTM parameters.
3) Your web server might be set up to rewrite URLs for various reasons, such as SEO-friendly URLs or to enforce certain URL structures. If not configured properly, this could lead to the loss of UTM parameters.
4) Some server-side scripts or applications might modify the URL and not preserve the original UTM parameters.
5) Certain security configurations or firewalls might alter or strip query parameters deemed unnecessary or potentially harmful.
6) Slow network conditions or connectivity issues can delay or prevent the loading and execution of tracking scripts like the ‘GA4 Configuration’ tag.
7) If a user navigates away from the page before it fully loads, the GA4 configuration tag may not have a chance to fire.
8) If other tags are firing before the GA4 configuration tag and causing disruptions or alterations to the URL, it might affect the GA4 tag’s ability to capture UTM parameters.
9) Browser extensions that block ads and trackers can prevent the GA4 tag from firing, thus impeding the collection of UTM parameter data.
10) JavaScript errors on the webpage can interfere with the execution of the GA4 tracking code, causing it not to fire even if it’s correctly implemented.
To address these issues, you must work with your IT team to ensure your web server is configured to preserve UTM parameters during rewrites or other server-side operations.
#4.5 Your web server is altering or truncating the UTM parameters.
Your web server may have certain configurations or limitations that can cause it to truncate URLs after a certain length.
If UTM parameters are included towards the end of a long URL, they may be cut off, leading to incomplete or missing data in GA4.
Example:
Original URL: https://example.com/product-page?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale&utm_content=ad_variant_A
Truncated URL: https://example.com/product-page?utm_source=google&utm_medium=cpc&utm_camp
The ‘utm_campaign’ and ‘utm_content’ parameters are truncated in this case.
As a result, GA4 might only capture partial or incorrect UTM data, making it difficult to determine which specific campaign or ad variant led to the visit.
In the worst case, your web server may be configured to strip the UTM parameters completely from your URLs.
#4.6 GA4 tracking code is embedded in an IFRAME, and the IFRAME is not a parent frame.
If the GA4 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 GA4 tracking code is always embedded in the parent frame.
Suppose it’s necessary for the tracking code to be within an iframe.
In that case, your developer will need to implement solutions to pass the UTM parameter data from the parent frame to the child iframe.
This might involve using JavaScript to communicate between frames or server-side solutions to propagate the parameters to the iframe’s URL.
Related article: How to use GA4 with iframe.
#4.7 URL redirects cause the UTM parameters to be dropped.
URL redirects, such as 301 (permanent), 302 (temporary), HTTP to HTTPS, or desktop-to-mobile site redirects, can sometimes result in the loss of UTM parameters appended to the URL.
When these parameters are lost during the redirection, GA4 cannot capture the campaign information, leading to inaccurate or incomplete campaign tracking data.
Work with your development team to modify how redirects are handled, ensuring that UTM parameters are preserved during the redirect process.
This often involves configuring the server to retain the original query string (containing the UTM parameters) and append it to the redirected URL.
If modifying the redirects is not feasible, another approach is to ensure that the final landing page URLs (the destination after any redirects) are tagged with the necessary UTM parameters.
This ensures that, despite any redirects, the UTM parameters remain in the final URL that loads in the user’s browser, allowing GA4 to capture the campaign data.
Related Article: How to see UTM parameters in GA4 (Google Analytics 4).
#4.8 Ad blockers and privacy extensions can prevent UTM parameters from being sent.
Ad blockers and privacy extensions can prevent UTM parameters from being sent to GA4 even if you can see them in the browser address bar.
As a result, the UTM parameters won’t be captured or recorded by GA4.
Some ad blockers can even strip UTM parameters from URLs, making it impossible for GA4 to track the source and medium of the traffic.
Example:
Original URL: https://example.com/?utm_source=linkedin&utm_medium=social&utm_campaign=winter_promo
Modified by Ad blocker: https://example.com/
#4.9 Ad blockers and privacy extensions can alter UTM parameters.
Some privacy extensions might modify the data sent via UTM parameters to GA4.
For example, a privacy extension might replace the UTM parameter values with generic or hashed values to protect user privacy.
Original URL: https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale
Modified by Extension: https://example.com/?utm_source=anonymized&utm_medium=anonymized&utm_campaign=anonymized
In this case, instead of receiving the specific values of the UTM parameters, GA4 would receive “anonymized” as the value for all UTM parameters, rendering the data meaningless for tracking purposes.
#4.10 You are using a cookie consent banner.
In GA4, UTM parameters won’t collect any data in the consent denied state, and they may also not collect any data if consent is subsequently granted.
If consent is subsequently granted after the page has already loaded, the UTM parameters from that initial page load will not be captured retroactively.
Consider the following scenario.
A user clicks on a Facebook ad with UTM parameters in the URL and, as soon as he lands on the page, sees a consent banner.
He clicks on ‘agree’ to accept cookie consent, but the UTM parameters still do not send any data to GA4.
If you manually tag the URLs of your Google Ads, the same thing could happen with Google Ads, too.
When a user lands on your page with UTM parameters in the URL, you can use JavaScript to store these parameters in a cookie immediately.
This storage happens even before consent is granted, ensuring the data is preserved.
UTM parameters are not directly related to user consent for data collection.
So you can store them even before the consent is granted.
Once the consent is granted, retrieve the UTM parameters from the cookie and send them to GA4.
If the consent is not granted, GA4 won’t collect any data from UTM parameters.
Cookies allow UTM parameters to persist across multiple pages and sessions, which is crucial if users navigate away from the landing page before granting consent.
#4.11 UTM parameters are included in the fragment portion of the URLs.
UTM parameters should be placed in the query string (the part of the URL after the ‘?’) so that GA4 captures them correctly.
If UTM parameters are placed in the fragment (the part of the URL following a #), GA4 does not capture them.
Example:
Correct:
https://example.com/page?utm_source=google&utm_medium=organic&utm_campaign=example_campaign
Incorrect:
https://example.com/page#utm_source=google&utm_medium=organic&utm_campaign=example_campaign
#5 UTM parameters do not strictly follow the channel rules for manual traffic.
Google published a set of rules (checklist) for GA4 UTM tracking, but most people continue to ignore this checklist and tag URLs however they please.
Then, they complain about the unassigned traffic appearing in their reports.
Unassigned traffic in GA4 refers to the website traffic that is not attributed to any one of the following default channel groups:
- Affiliates
- Audio
- Cross-network
- Direct
- Display
- Mobile Push Notifications
- Organic Search
- Organic Shopping
- Organic Social
- Organic Video
- Paid Other
- Paid Search
- Paid Shopping
- Paid Social
- Paid Video
- Referral
- SMS
Google uses certain rules (called ‘channel rules‘) to group similar website traffic sources (usually that all belong to the same traffic medium).
For example,
Consider the following traffic sources:
google (as in google / organic)
yahoo (as in yahoo / organic)
bing (as in bing / organic)
aol (as in aol / organic), etc.
Since they all have the same traffic medium, ‘organic’, they will be grouped together under the channel group ‘organic search’.
Google does not have any pre-defined channel rules to group traffic sources that have either user-defined sources and mediums or they are (not set).
So what it will do is group these traffic sources under the ‘unassigned’ channel group.
Your UTM parameters should strictly follow the channel rules for manual traffic (check the screenshot below) wherever you can so that your website traffic is attributed to one of Google‘s default channel groups.
For example, consider the following URL of a Facebook ad:
https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=fb-ad&utm_campaign=pdf-book-campaign&utm_content=ad1
Here, ‘fb-ad’ is not a system-defined traffic medium.
So Google will label all the website traffic from this URL under the ‘unassigned’ channel group.
But this is not what you want. You want this traffic to be grouped under the ‘paidsocial‘ channel.
To do that, rewrite the UTM parameters like the one below:
https://www.abc.com/book-maths-and-stats/?utm_source=facebook&utm_medium=paid&utm_campaign=pdf-book-campaign&utm_content=ad1
Here, paid is a system-defined traffic medium.
So Google will now label all the website traffic from this URL under the ‘Paid Social‘ channel group:
You can use utmprep.com tool to create UTM parameters that strictly follow the ga4 default channel rules.
Use system-defined traffic sources and system-defined traffic mediums wherever possible.
A system-defined source is one that is already defined/recognized by GA4 as a traffic source.
Similarly, a system-defined medium is one that is already defined/recognized by GA4 as a traffic medium.
The more user-defined traffic sources and/or medium you will use, the higher will be the unassigned website traffic in GA4.
Memorize channel rules and definitions for accurate tagging.
It is very important to know how Google groups similar traffic sources and how it defines a particular marketing channel.
This knowledge will help you tremendously in tagging URLs that follow GA4 default channel rules.
Share this information with all those who tag URLs in your organization. Everybody needs to be on the same page.
#6 You are tagging internal links.
GA4 does not give you the liberty to tag internal links.
UTM parameters on internal links can override the original source/medium data.
For example,
If a user initially came to your website through a Google search (organic) and then clicked on an internal link with UTM parameters, the source/medium might be reported as the parameters set on the internal link rather than Google.
This can distort your understanding of where your traffic is coming from.
Therefore, it is recommended to avoid using UTM parameters on internal links to maintain the accuracy of source/medium attribution.
Instead, consider using other tracking mechanisms like events to track internal navigation while preserving the original source/medium data.
#7 UTM parameters are not automatically sent with server-side GTM events.
To send UTM parameters server-side in GTM, you need to capture them client-side first and then pass them to your server.
#1 Use client-side GTM to create URL variables for each UTM parameter:
- Create a URL variable for utm_source.
- Create a URL variable for utm_medium.
- Create a URL variable for utm_campaign.
- Create variables for any other UTM parameters you want to track
#2 Create a custom HTML tag in client-side GTM to send the UTM data to your server:
<script>
(function() {
var utmParams = {
utm_source: '{{URL - utm_source}}',
utm_medium: '{{URL - utm_medium}}',
utm_campaign: '{{URL - utm_campaign}}'
};
// Send UTM data to server
fetch('/your-server-endpoint', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(utmParams)
});
})();
</script>
#3 In your server-side GTM container, create a custom variable to access the UTM data sent from the client:
Variable Type: Event Data
Event Data Key: the key you used when sending data from client-side
You can now use these server-side variables in your server-side tags to include UTM data in your server-side tracking.
By following these steps, you will be able to capture UTM parameters client-side and then pass them to your server-side GTM setup for further processing and tracking.
#8 You use both auto-tagging and manual tagging to tag URLs.
If you use manual tagging and auto-tagging together, then the source, medium, and other traffic classification dimensions use the auto-tagged values.
Only the ‘utm_content’ and ‘utm_term’ values from your manual tagging will be used.
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.