Advertisement
Jawad_Khan

EEC- GA4 - purchase - Ecomcircles

Mar 18th, 2023 (edited)
535
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: 'USD',
  6.     value: 29.98,                       // order total (price of all products)
  7.     transaction_id: 'abc123',           // transaction id
  8.       items: [{                         // an array with all products
  9.       item_name: 'Product 1',           // insert an actual product name
  10.       item_id: 'product1',              // insert an actual product ID
  11.              }]
  12.   }
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement