see if gtm automatically pushes pageview events without our own page-tracking code

This commit is contained in:
Neil Lalonde 2016-09-01 12:16:54 -04:00
parent 929730c008
commit 572713b801

View file

@ -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
}
});
});
}
} }
}; };