mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
see if gtm automatically pushes pageview events without our own page-tracking code
This commit is contained in:
parent
929730c008
commit
572713b801
1 changed files with 0 additions and 13 deletions
|
@ -33,18 +33,5 @@ export default {
|
||||||
window.ga('send', 'pageview', {page: url, title: title});
|
window.ga('send', 'pageview', {page: url, title: title});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// And Google Tag Manager too
|
|
||||||
if (typeof window.dataLayer !== 'undefined') {
|
|
||||||
onPageChange((url, title) => {
|
|
||||||
window.dataLayer.push({
|
|
||||||
'event': 'virtualPageView',
|
|
||||||
'page': {
|
|
||||||
'title': title,
|
|
||||||
'url': url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue