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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…