-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTPS protocol check no longer needed #1319
Conversation
Google now serves all Analytics scripts via SSL also at www.google-analytics.com, so the protocol check is no longer necessary.
This is nothing new; the URL Google recently (March 2012) experimented with configuring the certificates for the TL;DR: The reason we still have the protocol check is because it doesn’t work reliably in IE6. However, now that we’ve dropped support for oldIE in this project, we may want to remove the protocol check after all. Also:
|
I had noticed this back in March 2012 and emailed a friend who works on Google Analytics, to which he replied the current situation is temporary. See my comment above:
|
I understood this to mean that they tried this out in March 2012, then reverted it due to the incompatibility issue for older mobile browsers. A year later, they have either never reverted the certificate fix, or they have turned it back on again. So perhaps the mentioned "they may try this again" condition has already transpired? In any case, it seems the time has come to do this, which will both improve the performance of the script and remove the necessity for an extra DNS lookup, reducing the loading time. |
Link #1050 |
How about this? It seems to work for me. <script>var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];</script>
<script src="//google-analytics.com/ga.js" async="true"></script> You could even remove |
TL;DR |
Just wanted to comment that in my experience, there are a lot of bad bots that mis-understand the // protocol-less urls, so this transition from the js-only setup to the static protocol-less url is likely to result in a high frequency of 404 logged hits to //google-analytics.com/ga.js on your hosting server. Just something to be aware of if this change hits. |
Marked this to be included in v5 where IE 6/7 support is abandoned. But this PR includes unrelated commits. |
It seems the new Universal Analytics snippet uses the |
@mathiasbynens did you hear confirmation on this one? I can ping our guy if not. |
@paulirish Nope, never got a response. Email subject is “Re: Google Analytics, IE6, and SSL/HTTPS”, sent on March 27 2013, to Brian Kuhn and you in CC. Thanks for looking into it! |
Google now serves all Analytics scripts via SSL also at www.google-analytics.com, so the protocol check is no longer necessary.