Tracking an Order and Tracking Items

Highlighted
New Member
11 0 0
<script>
  ('ecommerce', 'addOrder', {
    order_id: '123456',   // Order ID. Required.    revenue:  '1315.25',  // Grand Total. Includes Tax and Shipping. Does not include payment costs.    shipping: '5.45',     // Total Shipping Cost. Does not include payment costs.    tax:      '301.25'    // Total Tax.  });
</script>
<script>
  ('ecommerce', 'addItem', {
    order_id:   '123456',                                    // Order ID. Required.    product_id: '111222',                                    // Product ID. Required.    name:       'Apple IPhone 6 Plus (16GB) Space Gray EU',  // Product Name. Required.    price:      '654.90',                                    // Price per Unit. Required.    quantity:   '2'                                          // Quantity of Items. Required.  });
</script>

 In order to add the above ecommerce commands (must be added at the final step of my checkout process after a user has successfully completed a purchase. Usually this is the "Thank You" or "Receipt" page), should I change (123456 is for the example, right?), for example, order_id: '123456' with what? 

order_id: 'order_id

and product_id: '111222' with 'product_id

Is it right to add them to the Settings - Checkout - Order processing - Additional scripts or should I add them somewhere else?

0 Likes