see if gtm automatically pushes pageview events without our own page-tracking code
This commit is contained in:
parent
929730c008
commit
572713b801
|
@ -33,18 +33,5 @@ export default {
|
|||
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 New Issue