Advertisement
ExceptionalPasteBin

CSI | Purchase dataLayer

Nov 15th, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. window.dataLayer = window.dataLayer || [];
  2. dataLayer.push({
  3. 'event': 'Purchase',
  4. 'ecommerce': {
  5. 'currencyCode': 'USD',
  6. 'purchase': {
  7. 'actionField': {
  8. 'id': '54872sde', // transaction id, required
  9. 'revenue': '575', // Total transaction value (incl. Tax)
  10. 'coupon': 'VIP' // Coupon code, if coupon was applied
  11. },
  12. 'products': [{
  13. 'name': 'Single Session',
  14. 'id': 'IWCE2020SS', // The id of the pass. Product Name or ID are required.
  15. 'price': '275', // Price from actual column
  16. 'category': 'IWCE20' // the name of the event
  17. 'quantity': 1
  18. },
  19. {
  20. 'name': 'PRIORITY LOUNGE',
  21. 'id': 'IWCE2020LOUNGE', // The id of the pass. Product Name or ID are required.
  22. 'price': '300', // Price from actual column
  23. 'category': 'IWCE20' // the name of the event
  24. 'quantity': 1
  25. }]
  26. }
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement