3

Our site does mostly regular client-side google analytics tracking, but for some stuff we do server-side calls to utm.gif to track pageviews (e.g. _trackPageView).

Over a recent period we did 1,257 of these server side _trackPageViews to google analytics, and for many of them I get "(not set)" for values:

  • for 508 of them, I get "(not set)" for "Screen Colors"
  • for 508 of them, I get "(not set)" for "Screen Resolution"
  • for 551 of them, I get "(not set)" for "flash version"
  • for 507 of them I get "(not set")" for country

Does anyone have any ideas? I am not setting these variables in my utm.gif requests, e.g. "utmsc" for "Screen colors", so my questions are:

  1. How is analytics getting these values for > 50% of the pageviews? I assume its correlating these pageviews with previous requests from the same visitor
  2. Why is it failing to find these values for many of these pageviews? Have I messed up the utm.gif requests somehow so it cannot correlate them?

I'm setting these parameters:

  • utmvw - 4.8.9
  • utmn - a random number (request id)
  • utmhn - host name of the pageview
  • utmcs - "UTF-8"
  • utmr - referrer
  • utmp - path of the pageview
  • utmac - account id
  • utmcc - cookies, I am grabbing the user's utma and umtz cookie
waterlooalex
  • 13,642
  • 16
  • 78
  • 99

1 Answers1

1

GA grabs most of those values using javascript, from info contained in the browser.

It is passed in the following parameters:

"Screen Colors" : utmsc

"Screen Resolution" : utmsr

"flash version" : utmfl

"for country" : I think they internally use a lookup table or query some other service based on IP given for image request

So you will have to use those parameters and pass values for them. Most of this info isn't passed in the headers of a request from client to server so in order to get the values, you will have to have a previous request from user and have javascript on the page that can retrieve those values from the browser and pass to your server (via AJAX or as a hidden field or appended to a link or whatever).

CrayonViolent
  • 32,111
  • 5
  • 56
  • 79
  • Hi Crayon, I get what you're saying, but any idea why GA gets values for these > 50% of the time? Presumably all of these people have made at least one request to my site, e.g. they had to get to my site before they could click the link I'm tracking. – waterlooalex Mar 23 '11 at 18:26
  • Here is a link that shows all the parameters used in the GIF request http://code.google.com/apis/analytics/docs/tracking/gaTrackingTroubleshooting.html#gifParameters – CrayonViolent Mar 23 '11 at 18:32
  • 1
    okay but if you are making a gif request with server-side code and not including those values, then it won't show up in the reports - more accurately, it will show up as "not set" because you are making a request but not sending in values. Whereas on a standard page view with javascript doing the image request, those values are being sent – CrayonViolent Mar 23 '11 at 18:33
  • I am making all 1,258 requests server side, and not including those values, and it IS showing up in the reports for 751 of the pageviews. See my question #1. – waterlooalex Mar 23 '11 at 18:35
  • Okay maybe I'm misunderstanding you here...but it sounds like you are saying you are making a lot of server-side requests, but overall, you are making requests both server-side AND client-side (with regular .js implementation) and..it's sending to the same account/profile right? So the "not set" values would be from your server-side hits and the set ones would be from the .js hits – CrayonViolent Mar 23 '11 at 18:37
  • Almost.. I do client-side normal tracking for everyone, for all normal pageviews. Then, for a subset of those users, I log additional pageviews server side. I logged 1,257 of these recently. For 751 of those pageviews, GA somehow correlated them with previous requests and found the country, screen-resolution, color-depth, but for 508 of them it failed to do that. – waterlooalex Mar 23 '11 at 18:39
  • Yes, both the client-side and server-side are sending to the same account/profile. Yes the "not set" values are coming from server-side, but only for 508/1257 of them. – waterlooalex Mar 23 '11 at 18:40
  • Okay so just to make sure I'm on the same page as you: a) You have NOT set those variables in your server-side hits. b) You are first filtering/segmenting to ONLY look at server-side hits, c) values for ~50% of server-side-only hits ARE showing up – CrayonViolent Mar 23 '11 at 18:48