简体   繁体   English

Google Analytics 中没有事件跟踪

[英]No event tracking in Google Analytics

I am sending a POST request to the Google analytics measurment protocol at我正在向 Google 分析测量协议发送 POST 请求

https://www.google-analytics.com/collect?v=1&t=event&tid=UA-151666808-2&cid=123&el=cus&ea=CLIENT_REGISTRATION_SUCCESS3&ec=Server https://www.google-analytics.com/collect?v=1&t=event&tid=UA-151666808-2&cid=123&el=cus&ea=CLIENT_REGISTRATION_SUCCESS3&ec=Server

However it is not being tracked on my site.然而,它并没有在我的网站上被跟踪。 I am sending it with Java API.我用 Java API 发送它。 I use rest template, feingClient, gama-client-core, google-analytics-java libraries.我使用休息模板、feingClient、gama-client-core、google-analytics-java 库。 The result is always the same - the event does not track.结果总是一样的——事件没有跟踪。 If I change mine tid to another, then the event is displayed in another resource.如果我将我的 tid 更改为另一个,则该事件将显示在另一个资源中。 Or if I call this link through POSTMAN, then the result is also successful.或者如果我通过POSTMAN调用这个链接,那么结果也是成功的。

The debug call for your request looks fine.您的请求的调试调用看起来不错。

{
  "hitParsingResult": [ {
    "valid": true,
    "parserMessage": [ ],
    "hit": "/debug/collect?v=1\u0026t=event\u0026tid=UA-151666808-2\u0026cid=123\u0026el=cus\u0026ea=CLIENT_REGISTRATION_SUCCESS3\u0026ec=Server"
  } ],
  "parserMessage": [ {
    "messageType": "INFO",
    "description": "Found 1 hit in the request."
  } ]
}

Data Processing time.数据处理时间。

Check the real time api to ensure that the hits are being recorded if they are then you are all set.检查实时 api 以确保正在记录命中,如果是,那么您就已经设置好了。 Then wait 24 - 48 hours for the data to complete processing you should see it in the standard reports then.然后等待 24 - 48 小时让数据完成处理,然后您应该会在标准报告中看到它。

bot filtering机器人过滤

Make sure you have disabled bot filtering on the view确保您已禁用视图上的机器人过滤

在此处输入图片说明

New google analytics account新的谷歌分析帐户

It takes up to 72 hours for an account newly created in Google analytics to start showing data.在 Google 分析中新创建的帐户最多需要 72 小时才能开始显示数据。

Quoted from google measurement protocol reference引自谷歌测量协议参考

Note that Google has libraries to identify real user agents.请注意,Google 有用于识别真实用户代理的库。 Hand crafting your own agent could break at any time.手工制作您自己的代理可能会随时中断。

You should change the request User-Agent to a browser like one so google doesn't think you are a bot.您应该将请求User-Agent更改为类似浏览器的浏览器,这样 google 就不会认为您是机器人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM