3 ms·
While we wait, lets make all sites we control ourselves use HTTPS. Change this line in the script: ga.src = ('https:' == document.location.protocol ? 'https://
by EmilStenstrom 13y ago
While we wait, lets make all sites we control ourselves use HTTPS. Change this line in the script:
ga.src = ('https:' == document.location.protocol ? 'https://ssl' https://ssl' : 'http://www' http://www') + '.google-analytics.com/ga.js';
To this:
ga.src = 'https://ssl.google-analytics.com/ga.js'; https://ssl.google-analytics.com/ga.js';
- Smerity 13y agoIn the article I explicitly say this won't work sadly :( While the Google Analytics JS is loaded over HTTPS, the tracking information sent back to Google inherits HTTP/HTTPS from the website itself. That means if you're on a HTTP site, it'll send back the results over HTTP. You'd need to actually hand roll your own GA JS to have it send back over HTTPS and then I'm not certain if that'll cause issues with records at Google's end.
- willnorris 13y agoadd to your tracking JS: _gaq.push(['_gat._forceSSL']); And for the newer analytics.js: https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#forceSSL https://developers.google.com/analytics/devguides/collection...