Shifting to _utmz to _ga

Some years back I had written about the __utmz cookie that Google Analytics uses to identify source attribution for visitors. If you are interested in reading that post, click here on Understanding the __utmz cookie.

Google evolves beyond Urchin

Google Analytics is based on the Urchin tracking management system and has been improving on that system over a period of time. As I have seen this product evolve, and many more features that were not there in Urchin … one of the major changes has been in the usage of cookies.

That makes my earlier post defunct.

The utmz Cookie

The utmz cookie used to contain the information about where the user has come from, which campaign, source and medium did the user react to arrive at the site. This information could be read and stored in a separate system (such as a CRM whenever a lead is captured). This could help in attribution of paying customers, and bring in all the crunchy goodness that you wanted.

Unfortunately, the utmz cookie no longer exists. The cookies have changed, if you are interested in know which cookies Google Analytics uses now, you can read this support article.

Where does that leave us?

So how do we go about finding more information about the user. This information is now not readable. However, what information we have on hand is a unique identifier of the cookie. That much still hasn’t changed.

So let’s take a look under the hood shall we,

The _ga cookie contains a value. This is the client id of the user. If you see the cookies collection, there are multiple _ga cookies, however, when you match it with the domain column, for every user – domain combination, there is a single _ga cookie.

This cookie is accessible by your server side script as well as your client side JavaScript. Therefore, we can get access to the _ga cookie value and store the client id within.

What is a client id?

To understand this, let’s go to Google Analytics. In GA, under the Audience section, we have a User Explorer report. Here’s a screenshot from my GA –

Check the value – 129754452.1496423206

This is available in the _ga cookie as well as in the user explorer. I can now identify specific users and leads in my CRM based on their client ids.

Therefore, I can even start checking their user behavior on the site, like so –

This is how the user has been visiting the site over a period of time. Notice the source is changing for different visits.

In a world where I would have been storing just the final source in the CRM, now I have a much more detailed view of how the user keeps coming to my site. This allows me to explore other attribution models and share the credit of the user’s conversion across channels.

This brings me one step closer to the World of And.

The World of And

In case if you haven’t already watched this, you need to watch this –


Understanding the __utmz Google Analytics Cookie

Google Analytics does tracking by using the urchin tracking cookies. In case if you do not know what are HTTP Cookies, then you need to start reading some of these articles that I am linking to!! They can give the crunch to your digital marketing initiatives.

Do bear with me through this post, I will get a bit technical. In case if you do understand a bit of PHP, you will enjoy this post. For now, just keep this information with you, it will come to your aid sometime later when you would be talking to your developers!

Some Cookie Basics first

So if you have any kind of server side script running on your server, then you can create your own cookies! You should know that on a PHP server environment, the entire set of cookies is available in the $_COOKIE reserved variable.

Isn’t this awesome? What this means is that with one line of PHP code, you can refer to all the cookies which are now on your site for each of your visitors.

If you take look under the hood, then you will see that there are many cookies used by Google Analytics.

kidakaka utmz cookie

Each of these cookies have a certain purpose. The way GA utilizes these cookies is well documented, and you can find the developer note here.

So why the __utmz Cookie?

The __utmz cookie contains the traffic source information in Urchin tracker format. It contains information about how and when an individual visitor hits your site for the FIRST time. That means whenever the visitor comes back to your site, this value remains unchanged.

Imagine a scenario wherein a visitor first sees a post of yours on Facebook, or on Google … or other traffic sources. The visitor comes to the site, checks out a few pages and goes away (… such a shame!!). After a few days, the same visitor comes back to the site via an ad. This time the visitor leaves his information on one of your contact forms (I do hope you are using these!).

How would you know that the user is a repeat visitor? The form will only contain data which is about the visitor’s current visit.

So, whom would you attribute this event to? Your advertisement (the later) or your social media sharing (the former)? Do you believe in first impressions or do you believe in the recency effect?

Without having information about the user’s previous visit to your site, you will always choose the later. Thus misattributing your visitor acquisition to the wrong medium! And that’s why the __utmz cookie is so important! In effect it represents a unique visitor for your website.

I treat the __utmz cookie as equal to a real person!!

Associated with it is a story, this story which rolls out in a set of visits. Google Analytics can tell you if you are willing to sift through the data that is available to you.

What can we do with this Cookie?

How do we bite into this Cookie? Well, there are more than one method of cutting this cookie!!

  • If you have conversions on your site (Downloads, Sales, Contact Forms, etc), then you can always use the value in this cookie to track the origin of the visitor. This will give you a definite number on which traffic source (and which marketing campaign) is more effective for you when it comes down to conversions.
  • Each __utmz has a unique value set, this unique value can be converted into a Custom Variable and you can then track a unique visitor across your site using this Custom Variable (the free version of Google Analytics allows 5 Custom Variables, so use them sparingly).
  • For the more technically sound platforms, you can use this and the other GA cookies to track the visitor ACROSS multiple visits. However, there are other tools which are far more easier to setup to do this viz., Mixpanel.
  • If you are betting a lot on acquisition of traffic via Search engines, then the __utmz cookie can be mined for keyword data … yes, the data which people are searching for and are coming to your site. However, as of 2013, GA only provides the keyword data of users who have not signed in into their Google Accounts (around 30% of the data is not available).

Hmmm … crunchy delight!! And nutritious as well!!

I would love to hear from you how else can we use this and the other Cookies. In the meantime, do start integrating your Cookies with your CRM for more visitor intelligence!