kangguru / rack-google-analytics

Simple Rack middleware for implementing google analytics tracking in your Ruby-Rack based project. Supports synchronous and asynchronous insertion and configurable load options
MIT License
257 stars 53 forks source link

added support for ip address anonymization #18

Closed ingooooooo closed 11 years ago

ingooooooo commented 11 years ago

I added a new option

:anonymizeIp => true

for ip address anonymization. This is useful for sites hosted in Germany in order to meet legal requirements as described under #4 in the following document (in German):

http://www.datenschutz-hamburg.de/uploads/media/GoogleAnalytics_Hinweise_fuer_Webseitenbetreiber_in_Hamburg_01.pdf

see also the api docs:

https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApi_gat?hl=de#_gat._anonymizeIp

tmaier commented 11 years ago

Thank you @ingooooooo. I also need this because of the german data protection laws. Would be great if @leehambley or @smontgomerie could review and merge it.

leehambley commented 11 years ago

I'm fine with that being merged, but I don't have time to take responsibility for another release at the moment.

tmaier commented 11 years ago

This is fine @leehambley.Thank you.