-
Task
-
Resolution: Done
-
Must have
-
None
-
1
-
Sprint #82
User Stories
- As a data analyst, I want to be able to track the landing page performance through Google Tag Manager and Google Analytics
Instructions
1. Paste the dataLayer.push as high in the <head> of the page as possible:
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'pageType': 'Landing Page',
});
</script>
2. After the dataLayer, paste the Tag Manager code. Both should be as high in the <head> of the page as possible, but GTM needs to load after the dataLayer:
<!-- GPI Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
{color:#205081}})(window,document,'script','dataLayer','GTM-N7SG829');</script>
<!-- End GPI Google Tag Manager -->
3. Additionally, paste this code immediately after the opening <body> tag:
<!-- GPI Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N7SG829"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End GPI Google Tag Manager (noscript) -->