If I have a code that request a page monitored by Google analytics the get response is 200 OK , but it's not logged with Google analytics does any one experienced this behavior ?

有帮助吗?

解决方案

Chances are if you are using curl or something similar to request the page the javascript on that page is not being executed. Google analytics code writes a tag to the document when the page has loaded and that script then connects to GA and logs the visit. The users browser is what executes the JS, curl and the like just return the page source outputted from the server.

其他提示

The response isn't immediate. How long are you waiting until you check to see if your response has been recorded?

Also are you logging from a public domainname.com or is from your local webserver that can't be accessed publically?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top