A
A
Andrey Plyuta2022-02-16 18:48:08
Google
Andrey Plyuta, 2022-02-16 18:48:08

How to get all values ​​in a variable?

Please tell me there is a DataLayer array with data about products in the product category, how to get all the values ​​\u200b\u200bin a variable in GTM and pass them to the Facebook code? In general, I made the variable set the values, but it receives only 1 value (
620d1d02b3822916255255.png
620d1d0e7e28e820850513.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2022-02-16
@motor4ikkk

You need to create a separate JavaScript variable and concatenate the data there. Something along the lines of:

function () { return {{ecommerce.impressions}}.map(function(a) {return a.name;}).join(', '); }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question