Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
would it be possible to add a simple option for the new feature "_gat._anonymizeIp();" to anonymize the IP addresses of visitors?
The functionality is described under:
http://code.google.com/intl/de-DE/apis/analytics/docs/gaJS/gaJSApi_gat.h...
Possibly this would be a great feature which you could reach with minimum effort.
Please contact me, if you need any further information or help.
Thank you very much.
Comment | File | Size | Author |
---|---|---|---|
#10 | 811156_anonymizeIp_6x.patch | 2.56 KB | hass |
#9 | 811156_anonymizeIp_6x.patch | 2.56 KB | hass |
#8 | 811156_anonymizeIp_7x.patch | 3.58 KB | hass |
#2 | google_analytics-anonymize_ips-811156-0.patch | 1.79 KB | Anybody |
Comments
Comment #1
AnybodyI just implemented the needed functionality and tested it, here's the code:
googleanalytics.module, please add in line 168 of V 6.2.2
googleanalytics.admin.inc, please add in line 251 of V 6.2.2
If I shell add it to the dev version, it would be nice if you could provide me with CVS access. Furthermore I could add test cases for this functionality.
You may find the patch file for the latest Head revision attached.
Comment #2
AnybodySorry, patch here!
Please check it first.
Comment #3
hass CreditAttribution: hass commentedHow about adding the line to the Custom Javascript section BEFORE?
This is at least only possible in the NEW async tracking code... and therefore depends on #648284: Support for Asynchronous Tracking
Comment #4
AnybodyI think it is not a good idea to add it as custom js because basic users won't understand. Why not add a checkbox?
In some countries like Germany for example collecting all this user information is not allowed by law. In my oppinion this option will clearly be used!
Why can it only be used with async tracking in your oppinion? I don't think so!
Quote from Google: "For async tracking, use the _gaq global object instead." - We don't!
But maybe I am wrong?
Comment #5
hass CreditAttribution: hass commentedAs I know - there is no law in Germany that does not allow you to collect the data... only the German data protection officers complain, but complain for good reasons :-). The day may come and German Google datacenters will open their doors...
I'm sorry - it looked like the new push syntax to me. In general I'm willingly to enable it by default... data protection has a higher priority for me than tracking. :-). Nevertheless this is minor as it's still possible to use if you care about it. Aside - removing only the last IP octet will not make you non-traceable... this may still be "personenbeziehbare Daten".
Comment #7
AnybodyWell there are laws concerning this topic, but at the moment they just don't prosecute.
The point is that you are not allowed to save personal data if it is not explicitly needed, but however... this should not be topic.
All in all it is a good feature, but I agree, not that important to be critial.
Why should it not be added to V6.x.2x.dev? (and 3.x.dev of course)?
Comment #8
hass CreditAttribution: hass commentedD7 patch for this feature.
The D7 version runs an update hook and if the site country is Germany (only available in D7) it automatically enables the anonymizeIp feature.
NOTE:
_gaq.push(["_anonymizeIp"]);
seems not working yet. There is a known workaround, but I do not like to implement it and better wait for Google to fix this API bug.Comment #9
hass CreditAttribution: hass commentedAnd the 6.x-3.x version.
Comment #10
hass CreditAttribution: hass commentedSwitch test branch
Comment #11
hass CreditAttribution: hass commentedI've committed the code, but keep in mind - until Google fixed the bug with
_gaq.push(["_anonymizeIp"]);
- this will not work. :-(Comment #13
hass CreditAttribution: hass commentedFound some people reporting that
_gaq.push(["_gat._anonymizeIp"])
works in async code. Interims workaround has been committed.http://blog.webalytics.de/2010/06/anonymisieren-von-ip-adressen-mit-goog...