Server-side Google Analytics - many pageviews getting "(not set)" values
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 开发者_StackOverflow中文版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:
- How is analytics getting these values for > 50% of the pageviews? I assume its correlating these pageviews with previous requests from the same visitor
- 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
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).
精彩评论