我在我的网站上使用google通用分析。尽管POST请求似乎发送正确,但我的分析帐户中没有跟踪到的事件。

这是发布请求(URL和分析ID被屏蔽)

Request URL:http://www.google-analytics.com/collect
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:application/json, text/javascript, */*; q=0.01
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Content-Length:120
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Host:www.google-analytics.com
Origin:http://www.xxxxxxxx.com
Referer:http://www.xxxxxxxx.com/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
Form Dataview sourceview URL encoded
v:1
tid:UA-xxxxxxxxx-1
cid:3E1FA9FE-28B3-7032-1714-5083DD155FCF
t:click
ec:link
ea:outbound_link
el:startpage
ev:headline
Response Headersview source
Access-Control-Allow-Origin:*
Cache-Control:private, no-cache, no-cache=Set-Cookie, proxy-revalidate
Connection:keep-alive
Content-Length:35
Content-Type:image/gif
Date:Fri, 10 May 2013 13:25:44 GMT
Expires:Mon, 07 Aug 1995 23:30:00 GMT
Last-Modified:Sun, 17 May 1998 03:00:00 GMT
Pragma:no-cache
Server:GFE/2.0
Via:1.0 non_disclosed:3128 (squid)
X-Cache:MISS from non_disclosed
X-Cache-Lookup:MISS from non_disclosed:3128
X-Content-Type-Options:nosniff

有人知道这是怎么回事吗?谢谢!

杰西

更新

我试图首先通过jquery的$ .post方法发送请求。您可以在上面看到结果。 Google Analytics(分析)未跟踪任何内容。

现在,我切换到了analytics.js开发人员指南中所述的方法
function trackOutboundLink(link, event_hittype, event_category, event_action, event_value) {
ga('send', event_hittype, {
    'clientId' : clientId,
    'eventCategory' : event_category,
    'eventAction' : event_action,
    'eventLabel' : link.href,
    'eventValue' : event_value,
    'hitCallback' : function () {
        // document.location = link.href;
    }
});

    window.open(
        link.href,
        '_blank'
    );
}

生成的请求如下所示:
Request URL:http://www.google-analytics.com/collect?v=1&_v=j8&a=217518556&t=event&dl=http%3A%2F%2Fwww.mywebsite.de%2F&ul=de&de=UTF-8&dt=Foosd=24-bit&sr=1440x900&vp=1439x747&je=1&fl=11.7%20r700&ec=OutboundLinkClick&ea=Startpage&el=http%3A%2F%2Ftest.de&ev=Headline&_u=OCC~&cid=283560406.1367606414&tid=UA-XXXXXXXX-1&z=496696042
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Host:www.google-analytics.com
Referer:http://www.mywebsite.de/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.65 Safari/537.31
Query String Parametersview sourceview URL encoded
v:1
_v:j8
a:217518556
t:event
dl:http://www.mywebsite.de/
ul:de
de:UTF-8
dt:Foo
sd:24-bit
sr:1440x900
vp:1439x747
je:1
fl:11.7 r700
ec:OutboundLinkClick
ea:Startpage
el:http://test.de
ev:Headline
_u:OCC~
cid:283560406.1367606414
tid:UA-XXXXXXXX-1
z:496696042
Response Headersview source
Access-Control-Allow-Origin:*
Age:120360
Cache-Control:private, no-cache, no-cache=Set-Cookie, proxy-revalidate
Content-Length:35
Content-Type:image/gif
Date:Thu, 16 May 2013 00:10:08 GMT
Expires:Mon, 07 Aug 1995 23:30:00 GMT
Last-Modified:Sun, 17 May 1998 03:00:00 GMT
Pragma:no-cache
Server:GFE/2.0
X-Content-Type-Options:nosniff

在新窗口中打开目标链接时,将正确触发事件。该请求的状态为200。

猜猜怎么着,我没有在Google Analytics(分析)中跟踪任何事件。我仔细检查了UA代码,但由于没有设置一个过滤器,因此无法想象分析中有任何过滤器。

此方法自昨天(24小时)开始在线。我不知道这是什么问题。

最佳答案

我确实看到的一件事是t:click。如果是事件,它将显示t:event
https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#event

关于google-analytics - Google Analytics(分析)已发送但未收到的Google Analytics(分析)通用事件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/16483640/

10-16 22:22