View difference between Paste ID: BqvBvMRq and 8ENE4Kqc
SHOW: | | - or go back to the newest paste.
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
brand: 'EGO',            //name of brand for which XPay has been loaded
5
  ecommerce: {
6
	currency: 'PKR',
7
    value: 29.98,						// order total (price of all products + shipping)
8
    tax: 3.00,							// tax
9
    shipping: 5.00,					// shipping costs
10-
    coupon: 'ENDOFSUMMER',			// if coupon was applied to the order, include it here			
10+
11-
    items: [{							// an array with all products
11+
   			
12-
      item_name: 'Product 1', 			// insert an actual product name
12+
    
13-
      item_id: 'product1',				// insert an actual product ID
13+
14-
      price: 11.99,					// insert an actual product price. Number or a string. Don't include currency code
14+