Catch event product click in Magento 2

by Randy   Last Updated August 15, 2018 10:09 AM

I am implementing gtm and I want to added data layer when user click on product from catalog, search result or related product. Data layer will be like this

{ "data": { "action": "category", "product": { "sku": "product sku", "name": "product name" } } }

Is there any way how can I catch product click event?

Answers 1

I think that you need to use the following event : catalog_controller_product_view

August 15, 2018 09:57 AM

Related Questions

How to Page Speed available on my magento2x?

Updated October 14, 2018 10:09 AM