Practical eCommerce

Manage Subscriptions · Subscribe Now · F.A.Q.'s

HOME · Monday, May 12, 2008

Development & Programming

Google Analytics' Security Warnings

How to fix this message so customers aren't scared

By: Brian Getting
Comments: 8

The subject of security warnings with Google Analytics is one that has been frequently brought up by our readers, and was something that I ran into when I launched the last Practical eCommerce website. The issue is that occasionally someone will install Google Analytics on their site only to find that users are getting errors about "both secure and unsecure" information on the page. Whether you understand that or not, it is not conducive to making an online sale.

When installing Google Analytics, someone needs to place two small pieces of JavaScript code on each page of the site they want to track. The first downloads a library of JavaScript functions that are used, and the second contains unique information about your Google account and calls some tracking functions. The error is generated by the first script, which accesses the server "Google-analytics.com" for the JavaScript library. You will notice that this server is not secure, and is the one to blame for security warnings.

Luckily, the solution is quite simple. For the pages on your site that are secured by an SSL certificate, you need to place a different piece of code to install Google Analytics. You can get the correct piece of code for your account by logging in to your Google Analytics account, and selecting "edit" next to the website profile that you want to use. Choose to edit the URL at the top of that page, and replace the "http://" with "https://", which will tell Analytics your site is secure. Save the changes and click "account status" for that website profile to get the new JavaScript code to install on secure pages only.

Notice that the server the browser now gets the JavaScript library from is "ssl.google-analytics.com" and the secure pages no longer generate a security warning.

AdvertisementInfopia

Blinklist | Del.icio.us | Furl | Ma.gnolia | Newsvine | Spurl | Reddit | Technorati

Published on Monday, February 05, 2007

Comments:

Just change the reference to the script to "//{url}" instead of "http://{url}" and youre set for both http and https pages...

Posted by: Ryan
Thursday, February 08, 2007

Both these solutions lead to a JavaScript error for me.

Posted by: Mel
Thursday, April 05, 2007

From the Analytics support page, this is the proper solution:

change "http://www" to "https://ssl"

Posted by: Mel
Thursday, April 05, 2007

Once you have signed into google analytics go to the http://www.google.com/support/analytics/bin/answer.py?answer=31846&topic=7175 page

Posted by: Pete
Monday, June 04, 2007

After I changed my website url to https and got the ssl script... Do I have to change it into original form (http://) or leave it as it is?

Posted by: rod
Tuesday, July 31, 2007

I don't know if this is new, but when you add the website for Google Analytics, you can select whether your website is http:// or https://

You get the correct js code to add depending on what you select.

Posted by: Lalit Mehta
Thursday, August 16, 2007

Mel's response above worked!!!

Change the reference to the javascript include from "http://www." to "https://ssl."

Posted by: John
Friday, December 07, 2007

http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55483

Posted by: Sergiy Lavryk
Wednesday, April 02, 2008

↑ Back to Top

Leave a comment:

Please enter the following security code exactly as it appears.


Comments are stripped of HTML code upon submission. All comments are submitted for approval prior to being published. Please allow up to 24 hours for the approval process to take place. Practical eCommerce reserves the right to remove any comment at any time for any reason.

 


Related Articles

Articles at Practical eCommerce related to Google Analytics' Security Warnings:

Related Podcasts

Podcasts at Practical eCommerce related to Google Analytics' Security Warnings:

Related Links

External links related to this article.

RSS 2.0 Feeds

Atom 1.0 Feeds

Technorati Tags

Ecommerce Articles

Browse All Articles
Browse our complete archive of ecommerce articles.
Accounting, Management & Legal
Ecommerce articles related to managing a small business including ecommerce accounting, business strategy and legal considerations.
Conversion & Usability
Online business articles about converting web site visitors into customers and how to gauge and improve your business website's usability.
Development & Programming
Articles to help designers, developers and programmers create successful, search engine friendly ecommerce websites and improve existing ones.
Hosting, Infrastructure & Software
Articles for ecommerce businesses about ecommerce web hosting, business infrastructure, business strategy and helpful ecommerce & small business software.
Interviews & Profiles
Interviews with prominent ecommerce business personalities and profiles of successful online businesses.
Inventory & Shipping
Ecommerce articles about inventory management, ecommerce order fulfillment and product shipping considerations.
Marketing & Revenue Growth
Articles relating to online marketing, email marketing and using the Internet to growing your business.
Search Engine Optimization
Search engine optimization articles for ecommerce business owners, strategists, marketers and developers.
Shopping Carts & Online Payments
Articles covering ecommerce shopping cart platforms and options for choosing an online payment gateway.
Training & Education
Tutorials and articles providing training and education for ecommerce business owners and developers of ecommerce websites.

Search Articles

Ecommerce Community

Ecommerce Blogs
Read our blogs about ecommerce topics written by industry professionals.
Community Forum
Connect with other ecommerce professionals to trade advice and answers in our community forum.
Podcasts
Check out our ecommerce podcasts covering topics ranging from interviews to tutorials.
RSS Content Feeds
Subscribe to our RSS feeds and have fresh ecommerce content delivered to you.

Ecommerce Resources

Free Email Newsletter
Sign up for Ecommerce Notes, our free email newsletter for ecommerce business owners and developers.
Ecommerce Directory
Browse our directory of ecommerce products and services, or submit your own listing in our directory.
Ecommerce Glossary
Familiarize yourself with terminology or submit terms to help others with our Ecommerce Glossary.
Events Calendar
Find out about upcoming ecommerce events or invite other ecommerce professionals by posting your own event.
Press Releases
Browse ecommerce related press releases and post your own press release for distribution.
Ecommerce Store & Back Issues
Pick up back issues of Practical eCommerce magazine along with other merchandise from Practical Ecommerce

About Practical eCommerce

Frequently Asked Questions
Look at frequently asked questions regarded using our website, subscribing to our magazine and more.
Advertising Information
Information about advertising in Practical eCommerce magazine, on our website, or in our email newsletters.
Editorial Sharing
Learn about options for sharing our content with your visitors, customers or employees.
About Us
Learn more about Practical Ecommerce magazine and meet our staff.
Contact Us
Contact Practical Ecommerce at any time for more information. We'd love to hear from you.
AdvertisementArial SoftwareStone Edge TechnologiesEndicia

Copyright 2007 Confluence Distribution, Inc. and Practical eCommerce.
All Rights Reserved.

Privacy PolicyConditions of UseContact Us