Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'eec.checkout', // name of an event. In this case, always stays as eec.checkout
- 'ecommerce': { // ecommerce object. This is the essential part of tracking. New EE data must always be pushed to this object
- 'checkout': { // name of an action. In this case, always stays as checkout
- 'actionField': {
- 'step': 1 // number of the checkout step that a user has entered (must always be 1 in this situation)
- },
- 'products': [ // list of products a user has initiated checkout
- {
- 'name': 'TBD (restaurant - meal name ex DUCK & WAFFLE - CORN RIBS)', // name of a product that is currently viewed
- 'id': 'TBD (ex 123456)', // id (SKU) of a product (unique for each product for each of the restaurants)
- 'price': '7.00', // price of a product (The price of one item. The value must not include anything else except number separated by a decimal point. Don't use a comma as the separator, and don't include any currency symbols.)
- 'brand': 'DUCK & WAFFLE', // brand/vendor of a product
- 'category': 'DUCK & WAFFLE/DUCK & WAFFLE', // Product category of the item. Can have maximum five levels of hierarchy. restaurant/sub-menu-category (ex. clothes/shirts/t-shirts)
- 'variant': 'TBD', // product variant. If there are no variants, exclude this key from the dataLayer.push
- 'quantity' : 1 // product quantity
- },
- {
- 'name': 'TBD (restaurant - meal name ex DUCK & WAFFLE - BACON WRAPPED DATES | Two per order)', // name of a product that is currently viewed
- 'id': 'TBD (ex 123457)', // id (SKU) of a product (unique for each product for each of the restaurants)
- 'price': '10.00', // price of a product (The price of one item. The value must not include anything else except number separated by a decimal point. Don't use a comma as the separator, and don't include any currency symbols.)
- 'brand': 'DUCK & WAFFLE', // brand/vendor of a product
- 'category': 'DUCK & WAFFLE', // category of a product within restaurant menu
- 'variant': 'TBD', // product variant. If there are no variants, exclude this key from the dataLayer.push
- 'quantity' : 2 // product quantity
- },
- {
- 'name': 'TBD (restaurant - meal name ex DUCK & WAFFLE - CRISPY YELLOWTAIL TAQUITOS | Two per order)', // name of a product that is currently viewed
- 'id': 'TBD (ex 123458)', // id (SKU) of a product (unique for each product for each of the restaurants)
- 'price': '15.00', // price of a product (The value must not include anything else except number separated by a decimal point. Don't use a comma as the separator, and don't include any currency symbols.)
- 'brand': 'DUCK & WAFFLE', // brand/vendor of a product
- 'category': 'SUSHISAMBA SMALL PLATES', // Product category of the item. Can have maximum five levels of hierarchy. restaurant/sub-menu-category (ex. clothes/shirts/t-shirts)
- 'variant': 'TBD', // product variant. If there are no variants, exclude this key from the dataLayer.push
- 'quantity' : 5 // product quantity
- }]
- }
- }
- });
- </script>
Add Comment
Please, Sign In to add comment