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 add_to_cart | |
4 | ecommerce: { | |
5 | items: [{ // an array with a product (or multiple products) that was added to a cart | |
6 | - | item_name: 'pro_monthly', // insert an actual product name |
6 | + | item_name: 'pro_annual', // insert an actual product name |
7 | - | price: '89.99', // insert an actual product price. Number or a string. Don't include currency code |
7 | + | price: '900', // insert an actual product price. Number or a string. Don't include currency code |
8 | currency: 'USD' | |
9 | }] | |
10 | } | |
11 | }); |