Google Analytics for Germany

December 17th, 2009 by Lars Johansson


Two solutions to make life easier for German website owners using Google Analytics:

1. Offer the possibility to opt out of being tracked by Google Analytics
2. Anonymize IP addresses tracked by Google Analytics

Post to Twitter Tweet This Post

Share on LinkedIn

Posted in Google Analytics, Web Analytics | No Comments »




Modify the IP Address Sent to Google Analytics (Germans, Look Here!)

December 17th, 2009 by Lars Johansson


I told you about the possibility to offer visitors the chance to opt out of being tracked by Google Analytics a couple of days ago.

After that I found out that EControlling.de has worked on a method to anonymize IP addresses before they get recorded by Google Analytics.

EControlling.de has played around with the utmip variable in server-side tracking scripts and replaced part of it using a regular expression.

They have also, as seen on www.analytics-anonym.de, replaced the ga.js on Google’s server with a modified version on their own server. The modified version loads __utm.gif from www.analytics-anonym.de instead of www.google-analytics.com. The “image” on the alternative server sends modified information to Google Analytics. Read more on the EControlling.de website.

Post to Twitter Tweet This Post

Share on LinkedIn

Posted in Google Analytics, Web Analytics | No Comments »




Google Analytics Opt Out (Block Tracking)

December 15th, 2009 by Lars Johansson

SakkTrakk (The Germanizah)—a small hakk to sakk the GA trakker


My colleague Christoffer Luthman at Mark Red has developed a small piece of code that makes it possible for website owners to offer a site-based opt-out function to visitors. It offers the possibility to block being tracked by Google Analytics on individual websites. The opt out does not work on a global level. A visitor has to opt out of being tracked by each website. The process for opting out is easy. There is simply a button to click on!

You may have seen the articles on sites like Econsultancy and TechCrunch about how Google Analytics may become banned in Germany. One of the reasons would be the lack of a possibility to opt out from being tracked without having to adjust cookie settings in the browser.

To offer a little bit of help to German website owners threatened with hefty fines we decided to make this little piece of code. It does not solve all of Google’s problems in Germany, but it’s one step in the right direction. I have written about the other points on my Swedish blog, but will leave that for now and simply focus on the opt out issue.

Test a SakkTrakk example

Download SakkTrakk now!


How does SakkTrakk work? Well, it places a cookie in the web browser for users who do not wish to be tracked. The setting in the cookie determines whether the Google Analytics tracker should be used or if the “mock object” gaOptOut.js should be used.

Implementation

Add “gaOptOut.js” within the head section of all pages:

Google Analytics Opt Out

Instead of using _getTracker(), use getOptOutTracker():

Blocking Google Analytics Script (Opting Out)

Caution: If the user deletes her cookies she’ll be tracked again until she activates SakkTrakk again. This script is provided “as is”, is free to use, and comes without any kind of warranty. Hey! it’s free, what did you expect?! You may alter the script to suit your needs. The script does currently not work if you use asynchronous tracking.

Post in German: Opt out für Google Analytics

PS. My apologies for the name of the product. My bad. I was simply inspired by the use of double k’s in German web analytics tool names. ;) You should also know that Mark Red is a big fan of Google Analytics, but we respect privacy.

Post to Twitter Tweet This Post

Share on LinkedIn

Posted in Google Analytics, Web Analytics | 10 Comments »