I've created google analytics and Google tag manager account to find out all event of product like Add to Cart
, Remove Cart
, Checkout
, Product click
, Checkout, Product impression
in Google Analytics.
I've created tag and Trgger for that but its not reflecting in Google anaytics.
First i want to display data layer in front end with all products details.
Please tell me how to pass data in data layer.
So i have to put code in core file to get product id
, name
, price
, etc. and pass variable on datapush script as mentioned on this URL.
Or Magento have default functionality for this.
only paste the script on header file? to get datalayer in frontend with details
Best Answer
Here is the Google Tag Manager module I would recommend for Magento 2 -:
https://github.com/magepal/magento2-google-tag-manager