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.