0

I want to grab the price key in the addToCart datalayer. It does not work by simply creating a price variable - I get the value Undefined. How do I grab a key that is nested this deep?

https://s22.postimg.org/f7g95zrk1/Screen_Shot_2016_11_05_at_14_09_00.png

JimiLoe
  • 950
  • 2
  • 14
  • 22

2 Answers2

1

Create new variable with this value:

ecommerce.products.0.price

You need to use dot notation to access nested dimension.

kelly
  • 415
  • 2
  • 9
  • 24
1

inserted this as a variable and just referenced the datavariable name in GTM.

ecommerce.add.products.0.price