View difference between Paste ID: mM73Vc9V and SGgFzyUC
SHOW: | | - or go back to the newest paste.
1
window.dataLayer = window.dataLayer || [];
2
window.dataLayer.push({
3-
  event: 'purchase',
3+
  event: 'ga4_purchase',
4
  reorder: 'true',  // Varaible value. 'true' - if the order is a reorder, 'false' - if the order is not a reorder.
5
  ecommerce: {
6
    currency: 'USD',                           //Required. Transaction Currency - Type: string
7-
    value: 13243.80,                           //Transaction Revenue  - Type: number
7+
    value: 8400.90,                           //Transaction Revenue  - Type: number
8-
    tax: 996.09,                               //Transaction Tax - Type: number
8+
    tax: 525.06,                               //Transaction Tax - Type: number
9
    shipping: 0.00,                            //Transaction Shipping - Type: number
10
    transaction_id: 'abc123',                  //Required. Transaction ID - Type: string
11
    coupon: 'coupon',                          //The coupon name/code associated with the event - Type: string
12
    items: [{
13-
      item_name: 'REDA ESP - Gas Handler',             //Product Name - Type: string
13+
      item_name: 'ECLIPSE Blackoil Reservoir Simulation',        //Product Name - Type: string
14-
      item_id: 'Reda-Esp-Gas-Handler',                 //Product ID/SKU - Type: string
14+
      item_id: '71274',                                //Product ID/SKU - Type: string
15-
      price: 11130.00,                                 //Product price - Type: number
15+
      price: 4000.00,                                  //Product price - Type: number
16
      currency: 'USD',                                 //Currency of the price that is collected - Type: string
17
      discount: 0.00,                                  //Any discount associated with this product - Type: number
18-
      affiliation: 'sals',                             //Vendor - Type: string
18+
      item_brand: 'Oil and Gas Software',              //Product Brand - Type: string   
19-
      item_brand: 'schlumberger',                      //Product Brand - Type: string   
19+
      item_category: 'Schlumberger Software',          //Product Category - Type: string
20-
      item_category: 'Production',                     //Product Category - Type: string
20+
      item_category2: 'Indonesia',                     //Product Sub-Category 1 - Type: string
21-
      item_category2: 'Electrical Submersible Pumps',  //Product Sub-Category 1 - Type: string
21+
      item_category3: 'Jakarta',                       //Product Sub-Category 2 - Type: string
22-
      item_category3: 'REDA ESP - Gas Handler',                //Product Sub-Category 2 - Type: string
22+
      item_variant: 'Foundation',                      //Variant of the product - variant SKU/ID - Type: string
23-
      item_category4: 'Gas Volume Fraction 75%',                //Product Sub-Category 3 - Type: string
23+
24-
      item_category5: 'item_category5',                //Product Sub-Category 4 - Type: string
24+
25-
      item_variant: '102761535',                       //Variant of the product - variant SKU/ID - Type: string
25+
      // Another item.
26
    }]
27
  }
28-
      item_name: 'Tiger Bullets',             //Product Name - Type: string
28+