mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 11:47:23 +02:00
fix(v2): don't even print anonymizeIP if false in Google Analytics plugin
This commit is contained in:
parent
270e22581a
commit
a2642e8acf
2 changed files with 1 additions and 4 deletions
|
@ -53,7 +53,7 @@ module.exports = function(context) {
|
||||||
innerHTML: `
|
innerHTML: `
|
||||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||||
ga('create', '${trackingID}', 'auto');
|
ga('create', '${trackingID}', 'auto');
|
||||||
ga('set', 'anonymizeIp', ${anonymizeIP});
|
${anonymizeIP ? "ga('set', 'anonymizeIp', true);\n" : ''}
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -67,9 +67,6 @@ module.exports = {
|
||||||
gtag: {
|
gtag: {
|
||||||
trackingID: 'UA-141789564-1',
|
trackingID: 'UA-141789564-1',
|
||||||
},
|
},
|
||||||
// googleAnalytics: {
|
|
||||||
// trackingID: 'UA-141789564-1',
|
|
||||||
// },
|
|
||||||
algolia: {
|
algolia: {
|
||||||
apiKey: '47ecd3b21be71c5822571b9f59e52544',
|
apiKey: '47ecd3b21be71c5822571b9f59e52544',
|
||||||
indexName: 'docusaurus-2',
|
indexName: 'docusaurus-2',
|
||||||
|
|
Loading…
Add table
Reference in a new issue