How to Track Product Views using GTM (Poor Data Layer)

Опубликовано: 31 Май 2026
на канале: Metric Mogul
11,758
93

Visit http://www.metricmogul.co.uk for expert analytics consulting.

In this video I’m tracking product details views using the Enhanced Ecommerce feature of Google Analytics, BUT doing some manipulation of the data layer at the same time.

The challenge is to work with the data layer that exists already, even though it isn’t in the exact format needed by Google Tag Manager.

In around 15 minutes we get everything set up as follows:

1. Inspect current data layer
2. Create variables within GTM to pick up values
3. Create a new productDetailView variable in GTM that converts the data layer values into a format GTM expects.
4. Create a trigger to fire when a product page is viewed.
5. Create a event to be sent to Google Analytics when a product page is viewed, which also triggers the Enhanced Ecommerce product detail view code.
6. Set up the Google Analytics admin interface.
7. Inspect the Enhanced Ecommerce reports to check everything is working.