Google Analytics Opt-out Add-on for Chrome

Martin Brinkmann
May 25, 2012
Updated • Jan 29, 2015
Google Chrome, Google Chrome extensions
|
9

Many websites and services make use of Google Analytics, a web statistics service that is tracking web users on websites where the script is installed.

Besides the tracking, there is also the aspect of loading times that are affected by the script.

Web users who do not want to be tracked, or want sites to load faster, may want to consider blocking the Google Analytics script from running on sites they visit.

Firefox users can use the excellent NoScript add-on for that, which takes care of both issues. Chrome users can install comparable solutions like NotScript or ScriptNo. Some may however feel that they interfere to much with day-to-day web browsing.

blocked-google-analytics

The Google Analytics Opt-out Add-on for the Chrome browser may not be the perfect solution, as it only tackles the tracking problem but not the loading of the script itself, but it does not interfere with other scripts running on the site.

The Chrome extension has been created by Google, which may be the reason why the script is not blocked outright. According to information posted on the Chrome Web Store, the add-on "communicates with the Google Analytics JavaScript (ga.js) to indicate that information about the website visit should not be sent to Google Analytics".

It basically means that the script is loaded, and that the add-on notifies the script that the visit should not be tracked.

Another solution that is working universally on the system would be to block Google Analytics in the hosts file. Simply add the following two lines to your hosts file:

  • 127.0.0.1 www.google-analytics.com
  • 127.0.0.1 ssl.google-analytics.com

On Windows, the hosts file is located in the C:\Windows\System32\drivers\etc directory. Just open it in a plain text editor like Notepad, and add the two rows to the end of it. This basically redirects requests that websites make to Google Analytics servers to the local system where the script can't be found. Webmasters should keep in mind that this may prevent them from accessing the Google Analytics website.

Summary
software image
Author Rating
1star1star1stargraygray
no rating based on 0 votes
Software Name
Google Analytics Opt-out
Landing Page
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Krishna said on May 27, 2012 at 7:53 am
    Reply

    Select out is very effective.

    http://selectout.org/tools/chrome/

  2. Lorissa said on May 26, 2012 at 5:42 pm
    Reply

    Yes, NoScript has the same effect.

  3. Lorissa said on May 26, 2012 at 10:44 am
    Reply

    My experience has been the same as Damirora.

    1. Martin Brinkmann said on May 26, 2012 at 11:06 am
      Reply

      Have you tried if NoScript or a comparable extension has the same effect?

  4. Damirora said on May 25, 2012 at 8:35 pm
    Reply

    Doesn’t blocking “ssl.google-analytics.com” cause some issues with Firefox¿ Has that been fixed now¿ I remember having to disable it with a comment.

    1. Martin Brinkmann said on May 25, 2012 at 8:52 pm
      Reply

      Is that because you are using Google Search in Firefox?

      1. Damirora said on May 26, 2012 at 12:31 am
        Reply

        Nope, not using Google Search in Firefox, it used to freeze on some sites/forums for some reason. Same way I found out that a lot of filehoster’s captcha are sometimes/regularly linked to Google.
        I don’t even have Google Search, I removed that ages ago, my default’s been DDG.

  5. ilev said on May 25, 2012 at 6:42 pm
    Reply

    Or you can install Do-Not-Track-plus

  6. Anonymous said on May 25, 2012 at 6:27 pm
    Reply

    You could also add them manually to Adblock or poison your own DNS if you’re using Tomato or DD-WRT firmware.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.