TypeError: tarteaucitron.user.multiplegtagUa
A simple patch to avoid "Uncaught TypeError: tarteaucitron.user.multiplegtagUa" like reported in #474 https://github.com/AmauriC/tarteaucitron.js/issues/474
This commit is contained in:
parent
fb94ae6c1e
commit
9265d30487
|
|
@ -2816,8 +2816,8 @@ tarteaucitron.services.multiplegtag = {
|
||||||
"use strict";
|
"use strict";
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
|
if (tarteaucitron.user.multiplegtagUa !== undefined) {
|
||||||
tarteaucitron.user.multiplegtagUa.forEach(function(ua) {
|
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());
|
||||||
|
|
@ -2825,6 +2825,7 @@ tarteaucitron.services.multiplegtag = {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Koban
|
// Koban
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue