在服务器端生成Google Analytics事件(__ utm.gif请求)

Pok*_*ot0 29 google-analytics

我愿意使用Google Analytics跟踪有关我的客户端/服务器应用程序使用情况的统计信息(用户计算机上没有浏览器!).

所以我想如果有人试图从服务器端代码处理__utm.gif的请求.

我在谷歌网站上找到了有关请求和相关cookie的一些信息,但没有关于"utmcc"变量中传递的cookie值的详细信息.

我知道我无法"制作"分析服务器从请求本身派生的一些信息(一个对所有人:源IP地址!).我无法从客户端计算机生成请求.

有没有人有这种情况的经验?任何详细信息或资源?任何工作的代码片段(任何语言都可以!:)?

And*_*y E 30

我最近问了一个类似的问题,有人给了我一个链接,我从同一个网站找到了另一个:

http://www.vdgraaf.info/wp-content/uploads/image-url-explained.txt
http://www.vdgraaf.info/wp-content/uploads/urchin-image.txt(这里包括)

Google的Google Analytics代码以JS库ga.js的形式提供.从此库调用跟踪功能时,会通过以下任一URL向GA服务器上的gif文件发出请求:

http://www.google-analytics.com/__utm.gif //from http pages
https://ssl.google-analytics.com/__utm.gif //from https pages

以下是在向GA提供详细信息的请求中可以使用的参数:

?utmwv=1 //Urchin/Analytics version
&utmn=634440486
&utmcs=UTF-8 //document encoding
&utmsr=1440x900 //screen resolution
&utmsc=32-bit //color depth
&utmul=nl //user language
&utmje=1 //java enabled
&utmfl=9.0%20%20r28 //flash
&utmcr=1 //carriage return
&utmdt=Linklove » The optimum keyword density //document title
&utmhn=www.vdgraaf.info //document hostname
&utmr=http://www.google.nl/search?q=seo+optimal+keyword+density&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_nlNL210NL211 //referer URL
&utmp=/the-optimum-keyword-density.html //document page URL
&utmac=UA-320536-6 //Google Analytics account
&utmcc= //cookie settings
    __utma=
                    21661308. //cookie number
                    1850772708. //number under 2147483647
                    1169320752. //time (20-01-2007) cookie first set
                    1172328503. //time (24-02-2007) cookie previous set
                    1172935717. //time (03-03-2007) today
                    3;+
    __utmb=
                    21661308;+ //cookie number
    __utmc=
                    21661308;+ //cookie number
    __utmz=
                    21661308. //cookie number
                    1172936273. //time (03-03-2007) today
                    3.
                    2.
        utmccn=(organic)| //utm_campaign
        utmcsr=google| //utm_source
        utmctr=seo+optimal+keyword+density| //utm_term
        utmcmd=organic;+ //utm_medium
Run Code Online (Sandbox Code Playgroud)

请记住,&utmcc值需要进行URL编码.


事实证明,这个答案中的链接有点不可靠,所以这里有一些其他可能有用的资源:


sch*_*max 5

您可以尝试http://code.google.com/p/serversidegoogleanalytics/.它为我工作(与http请求的zend框架结合).