Advertisement
CharlotteVDB

GA4 - Purchase - R.EV

Apr 24th, 2024
534
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: 'purchase',           // name of the event. In this case, it always must be purchase
  4.    ecommerce: {        
  5.       currency: 'EUR',
  6.       value: '72,93',
  7.       shipping: '7.95',
  8.       transaction_id: '45734',
  9.       coupon: 'blackfriday',
  10.       items: [{
  11.          item_name: 'R.EV World Champ TT "Time" T-shirt Black',             // insert a product name
  12.          item_id: '123456789',                      // insert an actual product ID
  13.          price: '34.99',  // insert an actual product price. Number or a string. Don't include currency code
  14.          item_brand: 'R.EV',           
  15.          item_category: 'World Champ TT collection',    // category of a product (= collection)
  16.          item_category: 'T-shirt',          // subcategory of a product (= type of clothing)
  17.          item_variant: 'S',         // variant of a product
  18.          quantity: '1'                     
  19. },{
  20.       item_name: 'R.EV Logo Beanie',    // insert a product name
  21.       item_id: '987654321',                     // insert an actual product ID
  22.       price: '29.99',                   // insert an actual product price. Number or a string. Don't include currency code
  23.       item_brand: 'R.EV',          
  24.       item_category: 'The R.EV Classics',           // category of a product (= collection)
  25.       item_category2: 'Beanie',         // subcategory of a product (= type of clothing)
  26.       item_variant: 'S',        // variant of a product
  27.       quantity: '1'                    
  28.     }]
  29.   }
  30. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement