User Defined Variables, Cookies, and the utm.gif – RUGA 5

More utmt variables today, this time it’s user defined variables (UDV’s, aka. utmt=var). UDV’s are Custom Variable’s older and lonely brother. Only one of them can be set, they write via a _setVar command and into a utmv cookie, and they have their own .gif request. Exciting, I know!

UDV’s function is the result of Google’s old means of thinking about user defined segmentation and the role of stuff like “visits” and views. Under this theology a UDV defines a visit, as opposed to segmenting a current visit. The problem with this is that, since UDV’s are set per visit, and since a visit starts before the _setVar has loaded, a UDV change will only propagate into reports at the start of the next visit. Ugly, no?

In Brian Katz’s words:

The user defined variable, utmv, has a life of two years. It applies to the entire first visit where it is written, as well as to all future visits. It gets overwritten by any other user defined variable that it encounters, but not until after the next visit. So if a new utmv is set on every visit, the first one will be good for Visit One and Visit Two, but the one the visitor encounters on Visit Two will apply to visit Three and the one he encounters on visit Three will apply to visit Four (and so forth.)
Implementing a custom variable is fairly easy. In your GATC code you can add pageTracker._setVar(”whatever”);. Alternatively you can apply the same code to actions using an onClick or equivilent, then define specific types of user based on behavior. Of course you have to remember the above: that UDV’s define a visit.

Since UDV’s make their own utm.gif request, the utm.gif variables that they load are a little different.

utmwv=4.9.2
utms=9
utmn=1512401513
utmhn=www.analysite.net
utmt=var
utmac=UA-

So you have tracking code version, shockwave version, random number, the type of call (a ‘var’) and your account code.

“But wait,” you say, “there’s no actual data in there. There’s just the utmt type!”

You’re paying attention!

Additionally, a UDV writes the utmv cookie with [user defined variable]|[custom var slot]=[custom var label]=[custom var value]=[session number] (the custom var part my be repeated if there are multiple custom variabless)

This then gets fed into the normal utm.gif request’s extensible parameter (utme):

utms=16
utmn=724652773
utmhn=www.analysite.net
utme=8(3!whatever)9(3!1338)11(3!1)
utmcs=ISO-8859-1

and so on and so forth…

And from there it’s just Google.

Next week we’re going to look at the last two utmt types: transaction and item.

Kent Clark

Some have compared him to the Dalai Lama, others to Kublai Kahn. When he isn't teaching third world children how to purify water with nothing more than a plastic bottle and a garden hose, he is creating mad waves for surfers off the west coast with little more than a paddle. Some say there is a boat involved, others that he walks on water. Little is known about his background. he appeared from nowhere 15 years ago and claims heritage from a land with neither want not need. He makes little comment, stating only that it was a pretty cool place. Fire does not burn him, cold does not hurt him. Words could... but they don't. When he passes, pedals fall off branches. When he speaks, hair tugs at skin, pulling just slightly in his direction. He does not sleep but he does dream. He has muscled his way into the lives of the famous and whispered his way into their hearts. And in the wee hours he plays oboe softly, as if to sooth the night to sleep.

Share
Published by
Kent Clark

Recent Posts

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

1 week ago

Understanding Funnel Reports in GA4

Funnel reports have long been one of the most actionable reports in a marketing analyst’s…

1 week ago

GA4 Monetization Reports: An Overview

GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…

2 weeks ago

This website uses cookies.