dusanmiha

ECD - Transaction Event

Sep 21st, 2020 (edited)
70
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. window.dataLayer = window.dataLayer || [];
  3. dataLayer.push({
  4.  'transactionId': '{{TRANSACTION ID}}', //(Required) Unique transaction identifier. String
  5.  'transactionAffiliation': '{{Buy/sell}}', // (Optional), možemo iskoristiti ovaj parametar da odvojimo prodajne od kupovnih transakcija. String
  6.  'transactionTotal': 38.26, //(Required) ECD revenue od transakcije. numeric
  7.  'transactionTax': 1.29, //optional, ne treba ništa
  8.  'coupon': {{coupon used}}, //optional, kupon kod koji su iskoristili ukoliko jesu
  9. 'paymentType': {{paymentType}}, //optional, tip placanja, bank ili card
  10.  'transactionShipping': 5, //(optional), ne treba ništa
  11.  'transactionProducts': [{ //(optional) List of items purchased in the transaction. Array of product objects
  12.    'sku': 'DD44', //(Required) ID kriptovalute
  13.    'name': 'Bitcoin (BTC)', //(Required) Naziv kriptovalute
  14.    'category': 'Cryptocurrency', // (Optional) Cryptocurrency
  15.    'price': 11.99,   //(Required) Unit Price. numeric
  16.    'quantity': 1  //(Required) Number of items. numeric
  17.  },{
  18.    'sku': 'AA1243544', //(Required) ID kriptovalute
  19.    'name': 'Ethereum (ETH)', //(Required) Naziv kriptovalute
  20.    'category': 'Cryptocurrency', // (Optional) Cryptocurrency
  21.    'price': 9.99, //(Required) Unit Price. numeric
  22.    'quantity': 0.66 //(Required) Number of items. numeric
  23.    'event': 'transactionCompleted' // custom event za transakciju
  24.  }]
  25. });
  26. </script>
RAW Paste Data