Merge pull request #654 from sir-gawain/anonymousGTag

add 'anonymize_ip' to gtag.js service.
This commit is contained in:
Amauri CHAMPEAUX 2021-04-09 19:17:37 +02:00 committed by GitHub
commit afcf534525
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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();