Skip to content

Commit

Permalink
feat($plugin-google-analytics): set anonymize ip to true (#1153)
Browse files Browse the repository at this point in the history
Add the anonymize ip setting to true in analytics configuration in order to be compliant with GDPR.
  • Loading branch information
vittominacori authored and ulivz committed Jan 8, 2019
1 parent 0ff1d6e commit 122e024
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/@vuepress/plugin-google-analytics/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default ({ router }) => {
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga')

ga('create', GA_ID, 'auto')
ga('set', 'anonymizeIp', true)
ga('send', 'pageview')

router.afterEach(function (to) {
Expand Down

0 comments on commit 122e024

Please sign in to comment.