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 | ecommerce: { | |
5 | - | currency: 'PKR', |
5 | + | currency: 'USD', |
6 | - | value: 29.98, // order total (price of all products + shipping) |
6 | + | value: 29.98, // order total (price of all products) |
7 | - | tax: 3.00, // tax |
7 | + | |
8 | - | shipping: 5.00, // shipping costs |
8 | + | items: [{ // an array with all products |
9 | item_name: 'Product 1', // insert an actual product name | |
10 | - | coupon: 'ENDOFSUMMER', // if coupon was applied to the order, include it here |
10 | + | |
11 | - | items: [{ // an array with all products |
11 | + | }] |
12 | } | |
13 | }); |