2
Good afternoon, everyone,
I need to bring a Lieyer data in my system. The people who work with Google Tag Manager have created some dataLayer and I need to gather some information with javascript to use in other places.
How can I read a particular dataLayer and get your information? Example of a dataLayer:
dataLayer.push({
'transactionId': '{{mov_vehicle_lead}}',
'transactionTotal': '{{PProd_Price_AmericanStandard}}',
'transactionProducts': [{
'sku': '{{PProd - VehicleID}}',
'name': '{{PProd_Veiculo}}',
'category': '{{PProd_Marca}}',
'price': '{{PProd_Price_AmericanStandard}}',
'quantity': '{{Quantidade}}'
}],
'event': 'transactionComplete'
});
Thanks for the help! Thank you!
If the
dataLayer
is an array, so much so that it adds new entries to this array withpush
, must use afor
to go through and get what you want. Give a concrete example of something you wanted to get fromdataLayer
– Isac
For example, I would like to take the sku value of the dataLayer.
– Renan Ludmann Pias