cancel
Showing results for 
Search instead for 
Did you mean: 

Tag Manager addToCart dataLayer Event Doesn't Fire

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Tag Manager addToCart dataLayer Event Doesn't Fire

Hi, 

 

Currently preparing a 1.9 to 2.2 Magento 2(.2.2) Commerce (EE) switch. For getting Google Analytics Enhanced Ecommerce data through Tag Manager and the store's dataLayer, I've followed these steps:

 

http://docs.magento.com/m2/ee/user_guide/marketing/google-tag-manager.html

 

This mostly works but I'm not getting the addToCart event firing. Which is rather essential not only for GA EE but also for the FB Pixel etc. 

 

Whether I have Stores > Settings > Configurations > Sales > Checkout > Shopping Cart > "After Adding a Product Redirect to Shopping Cart" set to Yes or No, neither in the GTM Preview, nor on the developer console do I see the addToCart event firing even though productImpression and productDetail events etc. work fine. 

 

Does this event fire in your 2.2.2. Magento 2 Commerce store? What could be preventing it to fire for us? Any pointers for debugging? Thanks!

5 REPLIES 5

Re: Tag Manager addToCart dataLayer Event Doesn't Fire

I have the same issue.

Did you solve it?

Re: Tag Manager addToCart dataLayer Event Doesn't Fire

I am facing exactly same problem - add to cart event is not firing in data layer

Re: Tag Manager addToCart dataLayer Event Doesn't Fire

In my case i have ajax cart pro installed, soy had to customize it like the native add to cart to fire that event.

Magento 2.2.3

Re: Tag Manager addToCart dataLayer Event Doesn't Fire

Any updates to this? actually, I am not sure why Magento has fired the event only for cart redirect enabled? I am trying to find if it should be fired somewhere else but with no success, anyone has any findings on this?
@johan_t. you mentioned the same config, did you come to my conclusion or why did you try to change its value to yes/no for checking the event?

Stores > Settings > Configurations > Sales > Checkout > Shopping Cart > After Adding a Product Redirect to Shopping Cart

Re: Tag Manager addToCart dataLayer Event Doesn't Fire

I'm facing the same issue with Magento 2 website.