最佳答案
I'm building a web app and using Google Analytics (analytics.js) for analytics. I recently noticed that analytics aren't working properly in Chrome.
I'm loading analytics using the standard code snippet in a separate module and included via requirejs. I've verified that this script runs as expected and executes the analytics snippet.
When I inspect network traffic in Firefox, I can see that the analytics script is loaded from Google as expected (HTTP 200 response):
However, when I run the exact same page in Chrome, I get an HTTP 307 response pointing to about:blank, and analytics does not run:
However, if I paste the analytics URL directly into the Chrome address bar, the script is found. Any ideas what's going on here, or how to fix it?