Browse Source

Merge pull request #654 from sir-gawain/anonymousGTag

add 'anonymize_ip' to gtag.js service.
Amauri CHAMPEAUX 4 years ago
parent
commit
afcf534525
1 changed files with 4 additions and 4 deletions
  1. 4 4
      tarteaucitron.services.js

+ 4 - 4
tarteaucitron.services.js

@@ -1582,7 +1582,7 @@ tarteaucitron.services.gtag = {
         tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
             window.gtag = function gtag(){dataLayer.push(arguments);}
             gtag('js', new Date());
-            gtag('config', tarteaucitron.user.gtagUa);
+            gtag('config', tarteaucitron.user.gtagUa, { 'anonymize_ip': true });
 
             if (typeof tarteaucitron.user.gtagMore === 'function') {
                 tarteaucitron.user.gtagMore();
@@ -3529,8 +3529,8 @@ tarteaucitron.services.matomo = {
         }, 100)
     }
 };
-                          
-                          
+
+
 tarteaucitron.services.matomohightrack = {
     "key": "matomohightrack",
     "type": "analytic",
@@ -3851,7 +3851,7 @@ tarteaucitron.services.userlike = {
         tarteaucitron.addScript('//userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/' + tarteaucitron.user.userlikeKey);
     }
 };
-                          
+
 // adobeanalytics
 tarteaucitron.services.adobeanalytics = {
     "key": "adobeanalytics",