
Utmz is a tracking code in Google Analytics that helps identify how users interact with a website, including the specific URL they landed on and how they got there.
It's a crucial piece of information for marketers and website owners, as it allows them to understand the effectiveness of their marketing campaigns and make data-driven decisions.
The utmz code is usually added to a URL as a query parameter, with a unique value assigned to each campaign or promotion.
Recommended read: Check Google Analytics for a Website
Utmz in Analytics
The __utmz cookie is a crucial part of web analytics, providing valuable insights into user behavior and marketing effectiveness.
By analyzing the data stored in the __utmz cookie, website owners and marketers can gain a better understanding of how users are finding their site and which marketing strategies are most effective.
The __utmz cookie helps with attributing the source of a visit, including the domain, timestamp, session counter, and campaign counter. It has a default duration of 6 months, which can be modified using the _setCampaignCookieTimeout function.
The values stored in the __utmz cookie are DomainHash.Timestamp.ContadorSesion.ContadorCampaña. The ContadorSesion value will be the same as the value in the __utma cookie.
The ContadorCampaña value will increment each time the user switches to a different campaign, regardless of the session counter value.
Google Analytics will always overwrite the campaign value unless it's a direct visit, meaning the user entered the website by typing the domain.
If a user enters the website directly and then comes back the next day from Google, the attribution will still be attributed to Google.
The only time attribution is not overwritten is when the traffic is direct, unless it's the first visit. If the user switches referrers during the same session, the attribution will not be overwritten.
The parameters written to the source of the visit include utmcsr (the source), utmccn (the campaign name), utmcmd (the medium), utmctr (the keyword or term used), and utmcct (the content).
You might like: Google Analytics 4 Session
Managing Utmz
Managing Utmz can be a challenge, but it's essential to understand the basics first. Utmz is a cookie that stores information about the user's visit to a website.
You can manage utmz by setting the cookie's expiration date to a specific time frame, such as 30 days, which is the default. This allows for accurate tracking of repeat visits.
To avoid overwriting existing utmz data, make sure to set the cookie's expiration date before setting a new utmz value.
Information Stored in the Cloud
The __utmz cookie stores several pieces of information, encoded in a string. This includes the timestamp, which is the time at which the cookie was set.
The session number of the visit is also stored in the __utmz cookie. This helps track the user's activity over time.
The campaign number, source, medium, term, and content are all stored in the __utmz cookie. The campaign number is a unique identifier for the marketing campaign that brought the user to the site.
Broaden your view: Google Analytics 4 Bounce Rate Trend over Time
The campaign source is the source of the traffic, such as a search engine (google), direct, or referring site. The campaign medium is the medium of the traffic, such as organic, CPC (cost per click), or email.
The campaign term is the search term used if the visitor came from a search engine. The campaign content is used for A/B testing and content-targeted ads to specify the version of a link or ad that was clicked.
Here's a breakdown of the information stored in the __utmz cookie:
- Timestamp: The time at which the cookie was set.
- Session Number: The session number of the visit.
- Campaign Number: The number of the campaign that brought the user to the site.
- Campaign Source: The source of the traffic, e.g., search engine (google), direct, referring site.
- Campaign Medium: The medium of the traffic, e.g., organic, CPC (cost per click), email.
- Campaign Term: The search term used if the visitor came from a search engine.
- Campaign Content: Used for A/B testing and content-targeted ads to specify the version of a link or ad that was clicked.
Lifespan
The utmz cookie typically has a lifespan of six months.
This lifespan can vary depending on the website's configuration, so it's essential to check your site's settings to understand how long the cookie will last.
It gets updated with each page view if a user enters the site from a different source, which helps the cookie stay relevant and useful for tracking purposes.
Managing and Deleting

You can manage and delete the utmz cookie through your browser settings. This may impact your experience on a site and the accuracy of traffic data collected by Google Analytics.
Deleting the utmz cookie may affect the accuracy of traffic data.
If this caught your attention, see: How to Check Blog Traffic on Google Analytics
Utmz Format and Examples
The __utmz cookie string is a crucial part of Google Analytics tracking. An example value of the __utmz cookie might look like this: 123456789;utmcsr=google|utmccn=(not set)|utmcmd=organic|utmctr=utmz cookie.
The __utmz cookie string contains a series of values separated by semicolons. Each value represents a different piece of information about how a user arrived at a website.
The first value in the string is a unique identifier for the user's session. The second value indicates the source of the traffic, such as a search engine or a referral from another website. The third value indicates the campaign name, which is often set to "(not set)" if no campaign is specified. The fourth value indicates the medium through which the user arrived, such as "organic" for a search engine result. The fifth value indicates the keyword or term that was searched.
A fresh viewpoint: How to Set up Google Analytics for Website
Sources
- https://www.captaincompliance.com/education/__utmz/
- https://www.thyngster.com/las-cookies-de-google-analytics-desde-dentro/
- https://helpful.knobs-dials.com/index.php/Utma,_utmb,_utmz_cookies
- https://www.analyticsmania.com/google-tag-manager-recipes/utmz-cookie-replicator/
- https://www.morevisibility.com/analytics/insights/from-utma-to-utmz-google-analytics-cookies/
Featured Images: pexels.com