Universal Analytics Measurement Protocol响应200 OK,但没有事件发生 [英] Universal Analytics Measurement Protocol respond 200 OK, but no events appers

查看:97
本文介绍了Universal Analytics Measurement Protocol响应200 OK,但没有事件发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Measurement协议将事件从Winform应用程序发送到Universal Analytics,并使用fiddler检查请求和响应。一切似乎都没有问题,但Universal Analytics中未显示任何事件。



我的应用请求:

  POST http://www.google-analytics.com/collect HTTP / 1.1 
主持人:www.google-analytics.com
内容长度:112
预计:100-继续

v = 1
& tid = UA-44974825-1
& cid = 1aba0888-732f-4690-9a91-d906c94a4a23
& amp ; t =异常
& exd = NullReferenceException
& exf = 1

服务器响应:

  HTTP / 1.1 200 OK 
Pragma:no-cache
过期时间:周一, 1995年8月7日23:30:00 GMT
Cache-Control:private,no-cache,no-cache = Set-Cookie,proxy-revalidate
Access-Control-Allow-Origin:*
上次修改时间:Sun,17 May 1998 03:00:00 GMT
X-Content-Type-Options:nosniff
内容类型:image / gif
日期:10月18日,星期五2013 13:54:39 GMT
服务器:Golfe2
内容长度:35
备用协议:80:quic

GIF89a ,d;


解决方案

您的请求缺少应用名称参数,& an,这是通过Measurement Protocol将数据发送到Google Analytics中的应用配置文件所必需的。

通过Measurement Protocol向Google Analytics发送应用数据的要求记录在此处:
https://developers.google.com/analytics/devguides/collection / protocol / v1 / devguide#apptracking



GA端点将始终返回200 ,即使请求缺少必需的参数。


I am sending events from Winform application to Universal Analytics via Measurement protocol and I use fiddler to inspect the request and response. Everything seems to be OK, but no events appears in Universal Analytics.

My app request:

POST http://www.google-analytics.com/collect HTTP/1.1
Host: www.google-analytics.com
Content-Length: 112
Expect: 100-continue

v=1
&tid=UA-44974825-1
&cid=1aba0888-732f-4690-9a91-d906c94a4a23
&t=exception
&exd=NullReferenceException
&exf=1

Server response:

HTTP/1.1 200 OK
Pragma: no-cache
Expires: Mon, 07 Aug 1995 23:30:00 GMT
Cache-Control: private, no-cache, no-cache=Set-Cookie, proxy-revalidate
Access-Control-Allow-Origin: *
Last-Modified: Sun, 17 May 1998 03:00:00 GMT
X-Content-Type-Options: nosniff
Content-Type: image/gif
Date: Fri, 18 Oct 2013 13:54:39 GMT
Server: Golfe2
Content-Length: 35
Alternate-Protocol: 80:quic

GIF89a�����������,�������D�;

解决方案

Your request is missing the app name parameter, &an, which is required for sending data to app profiles in Google Analytics via the Measurement Protocol.

The requirements for sending app data to Google Analytics via the Measurement Protocol are documented here: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide#apptracking

The GA endpoint will always return 200, even if the request is missing required parameters.

这篇关于Universal Analytics Measurement Protocol响应200 OK,但没有事件发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆