feat(v2): support IP anonymization for Google Analytics plugin (#2148)

* Support IP anonymization for google analytics

* Fixes

* Add docs

* typo fix

* Fix syntax

* document in suggested place

* attempted to add functionality to gtag plugin

* Remove from api-site-config

* document in appropriate places

* fix anonymize IP

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
This commit is contained in:
Reece Dunham 2020-01-12 08:27:08 -05:00 committed by Yangshun Tay
parent 5e821fd4e0
commit ad031a15a4
3 changed files with 10 additions and 3 deletions

View file

@ -312,6 +312,8 @@ module.exports = {
themeConfig: {
googleAnalytics: {
trackingID: 'UA-141789564-1',
// Optional fields.
anonymizeIP: true, // Should IPs be anonymized?
},
},
};
@ -338,6 +340,8 @@ module.exports = {
themeConfig: {
gtag: {
trackingID: 'UA-141789564-1',
// Optional fields.
anonymizeIP: true, // Should IPs be anonymized?
},
},
};