react-gtm
react-gtm copied to clipboard
Proper way to push Behavioural data to Google Analytics (Page Path, Page Title)
We are having a very simple issue related with getting the paths and titles for google analytics.
we are trying so far :
const tagManagerArgs = {
gtmId: 'GTM-NQW7XVF',
dataLayer: {
event: 'Pageview',
pagePath: location.pathname,
pageTitle: document.title,
}
}
and is not pushing anything to analytics :(
Did you use TagManager.dataLayer(tagManagerArgs)
to push it?