ROCKET ACADEMY

DASHBOARD

ACCOUNT

CONTACT

WEBINARS

LOGOUT

Lesson 5: EEC – Part 1: Datalayer.Push

Deploying a complete Enhanced E-commerce implementation can be complex and will be unique to your business, but there are a few key elements that will be consistent across any implementation.

The first thing to understand is that an implementation is based on a Datalayer Push. A Datalayer Push is just a way to inject data from your webpage in Google Tag Manager, and then from GTM into any other platform you use (I.E Google Analytics, Facebook, Piterest etc.).

A Datalayer Push looks like this:

dataLayer.push({
  'event': 'view_item_list',
  'ecommerce': {
    'items': [
     {
       'item_name': 'Triblend Android T-Shirt'
       'item_id': '12345',
       'price': '15.25',
       'item_brand': 'Google',
       'item_category': 'Apparel',
       'item_category2': 'Mens',
       'item_variant': 'Gray',
       'item_list_name': 'Search Results',
       'quantity': '1'
     },
     }]
  }
});

So let’s break this dataLayer.push down, there are a few key elements to be aware of. The first is that Datalayer.Push must occur and be deployed before the GTM script in your source code. The second thing is each datalayer needs an event category. The third thing is that for enhanced ecommerce you must have ‘ecommerce’ and then ‘items’ for GA4 in order to populate the data into GA4.

You can see this DataLayer Push contains a view_item_list (which would occur on a shop page for example) that contained a ‘Triblend Android T-Shirt’ with a item_id of 12345 a price of 15.25  and other product data. 

Tools in this Lesson

Lesson Assignment

No Assignment

Key Takeaways