Advertisement
prabapro

GA4 Ecommerce Items Array - Kristian - 2022-08-15

Aug 15th, 2022
732
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function() {
  2.   var ecommerce = JSON.parse(JSON.stringify({{dlv - ecommerce v1 - TEST}}));
  3.   return ecommerce.items.map(function(prod) {
  4.     return {
  5.       item_name: prod.item_name,
  6.       item_id: prod.item_id,
  7.       item_brand: prod.item_brand,
  8.       item_category: prod.item_category,
  9.       price: prod.price,
  10.       quantity: ecommerce.add.products[0].quantity,
  11.     };
  12.   });
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement