Search code examples
google-analyticsgoogle-tag-managerenhanced-ecommerce

Google Analytics Enhanced Ecommerce with datalayer - which events in Tag Manager?


I'm using Google Analytics Enhanced Ecommerce with the datalayer on my webshop. Any event (product impression, detail view, add to cart, etc.) is added to the datalayer.

I'm also using Google Tag Manager. Currently, I just have one tag with Enhanced Ecommerce enabled, and 'Use datalayer' enabled.

I do get most data into Google Analytics, but in the Product Performance report, data like cart/detail and purchase/detail is all 0%.

I feel like I am missing some events that need to be added to GTM, but I am not sure which ones, and I'm not able to find clear documentation.

Should the single GTM tag with EE enabled cover everything, or should I add custom events? If so, which ones, and are there any examples available?


Solution

  • When you push e-commerce data to the dataLayer, you need to/should push an event as well, eg.

    dataLayer.push({
      'event': 'ee add to cart',
      // The rest of your ecom dataLayer info
    })
    

    so that you can use an event tag that fires on the ee add to cart event and is also configured to read in the standard EE dataLayer. You should always push an event with the associated dataLayer and create event tags (or use the existing pageview tag) to capture that data. You should be able to find more examples here