vtex-apps/google-tag-manager

productReference & skuReference (Custom dimension 1 & 2) Are Null in add_to_cart event in datalayer.

AFJ-Whirlpool opened this issue · 0 comments

Describe the bug
When the event add_to_cart is launched the values for custom dimension 1 and 2 (productReference & skuReference) are missing this is proven by the fact that in the view_item event these values are filled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'GTM preview and add a product to the cart'
  2. Click on 'DataLayer withing GTM preview mode'
  3. Scroll down to 'Ecommerce Items'
  4. See error

Expected behavior
The same way the Datalyer is represented in the view_item event

Screenshots
image

this is how it should look take view_item as base
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.