Merge pull request #539 from Cyrille37/Cyrille37-TypeError-multiplegtagUa
TypeError: tarteaucitron.user.multiplegtagUa
This commit is contained in:
commit
cbe16bbc16
|
|
@ -2852,14 +2852,15 @@ tarteaucitron.services.multiplegtag = {
|
||||||
"use strict";
|
"use strict";
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
tarteaucitron.user.multiplegtagUa.forEach(function(ua) {
|
if (tarteaucitron.user.multiplegtagUa !== undefined) {
|
||||||
|
tarteaucitron.user.multiplegtagUa.forEach(function(ua) {
|
||||||
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + ua, '', function () {
|
tarteaucitron.addScript('https://www.googletagmanager.com/gtag/js?id=' + ua, '', function () {
|
||||||
window.gtag = function gtag(){dataLayer.push(arguments);}
|
window.gtag = function gtag(){dataLayer.push(arguments);}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
gtag('config', ua);
|
gtag('config', ua);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue