Google Analytics & Secure Connections with HTTPS

I ran into a small problem with Google Analytics and secure connections. I worked with a company to get a secure certificate installed and noticed that the Google Analytics tracking code placed on the pages was calling a script from http and not https. This raised an alert in Internet Explorer asking if you “want to display non-secure items in the page”. Firefox also had a red icon, indicating everything was not secure on the page.

A quick search on Google turned up nothing useful, so I visited Google Analytics and quickly found the answer to my problem - http://www.google.com/support/analytics. The instructions are straightforward and you can place the code on non-secure and secure pages. Looking at the new tracking code and both JavaScript files on Google’s server, it looks like the only difference is the tracking code calls the script over https. This leads me to believe you could only update the secure pages on your site with the new tracking code and be fine.

Leave a Reply