Last active
June 13, 2018 08:54
-
-
Save said-and-done/2ae268a00292d61696de58cbbc2a4602 to your computer and use it in GitHub Desktop.
Anonymize IP in analytics embed code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
$ find ../static -type f -name 'content.json' \ | |
-exec grep -Hi "ga('send', 'pageview');" {} \; \ | |
-exec gsed -i "s|ga('send', 'pageview');|ga('set', 'anonymizeIp', true);ga('send', 'pageview');|g" {} \; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment