Skip to content

Commit 122e024

Browse files
vittominacoriulivz
authored andcommitted
feat($plugin-google-analytics): set anonymize ip to true (#1153)
Add the anonymize ip setting to true in analytics configuration in order to be compliant with GDPR.
1 parent 0ff1d6e commit 122e024

File tree

1 file changed

+1
-0
lines changed
  • packages/@vuepress/plugin-google-analytics

1 file changed

+1
-0
lines changed

packages/@vuepress/plugin-google-analytics/inject.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default ({ router }) => {
1717
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga')
1818

1919
ga('create', GA_ID, 'auto')
20+
ga('set', 'anonymizeIp', true)
2021
ga('send', 'pageview')
2122

2223
router.afterEach(function (to) {

0 commit comments

Comments
 (0)