Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function() { // transforma matriz GA4 em matriz Contents do Facebook
- var products = {{0.20 - [🕹️] Matriz items (search)}}; // substitua por sua matriz items da etapa em que se encontra
- var tam = products.length
- var indice=0
- var viarray =[{"id":products[indice].item_id,
- "title":products[indice].item_name,
- "category":products[indice].item_category,
- "item_price":products[indice].price,
- "quantity":products[indice].quantity
- }];
- var tam=tam-1
- while (tam !=0){
- var indice=indice+1
- viarray.push ({"id":products[indice].item_id,
- "title":products[indice].item_name,
- "category":products[indice].item_category,
- "item_price":products[indice].price,
- "quantity":products[indice].quantity
- });
- var tam=tam-1
- }
- return viarray;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement