Merge pull request #169 from petitj/master
Gtag variable should be set in global scope for later use
This commit is contained in:
commit
6051de4fb7
|
|
@ -1073,7 +1073,7 @@ tarteaucitron.services.gtag = {
|
||||||
"use strict";
|
"use strict";
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
|
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + tarteaucitron.user.gtagUa, '', function () {
|
||||||
function gtag(){dataLayer.push(arguments);}
|
window.gtag = function gtag(){dataLayer.push(arguments);}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
gtag('config', tarteaucitron.user.gtagUa);
|
gtag('config', tarteaucitron.user.gtagUa);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue