change func signature for ga4

This commit is contained in:
Jon McClure 2023-05-30 13:42:19 +01:00
parent 914f42c432
commit af63b9bf50

View file

@ -21,8 +21,8 @@ export default () => {
if (!window.gtag) {
attachScript();
/** @type {Gtag.Gtag} */
window.gtag = (...args) => {
window.dataLayer.push(...args);
window.gtag = function() {
window.dataLayer.push(arguments);
};
window.gtag('js', new Date());
// config event registers a pageview by default