Advertisement
CharlotteVDB

GA4 - EEC - Add to Cart - FDMKR

Nov 22nd, 2022 (edited)
571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.dataLayer = window.dataLayer || [];
  2. window.dataLayer.push({
  3.    event: 'add_to_cart',            // name of the event. In this case, it always must be add_to_cart
  4.    ecommerce: {
  5.     items: [{                          
  6.       item_name: 'Alpecin-Fenix Sweatpants 2022',           // insert a product name
  7.       item_id: 'CIT30283',                      // insert an actual product ID
  8.       price: '49.90',                   // insert an actual product price. Number or a string. Don't include currency code
  9.       item_brand: 'FDMKR',         
  10.       item_category: 'Team Alpecin - Fenix',            // category of a product
  11.       item_category2: 'Sweatpants',         // subcategory of a product (type of clothing)
  12.       item_variant: 'L',            // variant of a product, if there are no variants, exclude this key from the dataLayer.push
  13.       quantity: '1'                     // always '1'
  14.     }]
  15.   }
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement