Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- 'event': 'eec.purchase',
- 'ecommerce': { // The Ecommerce object. This is the essential part of the tracking. New EEC data must always be pushed using this object.
- 'currencyCode': 'USD', // The currency which is set by the visitor.
- 'purchase': {
- 'actionField': {
- 'id': '123456', // The unique order ID of the transaction. Should match the actual ID of the order.
- 'revenue': '360.00', // Total transaction value (incl. tax and shipping)
- 'tax':'0.00',
- 'shipping': '0.00',
- 'coupon': 'coupon name' // The coupon code that was used for the entire transaction.
- },
- 'products': [{ // Should contain all the purchased products.
- 'name': 'Sauvage Parfum - Spray 3.4 oz', // The name of the product that is purchased. Always include it.
- 'id': 'C099600455', // The ID (SKU) of the product. Always include it.
- 'price': '180.00', // The price of the product.
- 'brand': 'DIOR', // The brand name of the product.
- 'category': 'Men's Fragrance/Sauvage', // Category of the product.
- 'variant': 'Spray 3.4 oz', // The product variant. If there are no variants, always send Base Product.
- 'quantity': 1
- },
- {
- 'name': 'Sauvage Elixir - Spray 2.0 oz',
- 'id': 'C099600755',
- 'price': '180.00',
- 'brand': 'DIOR',
- 'category': 'Engraving Service/Fragrance',
- 'variant': 'Spray 2.0 oz',
- 'quantity': 1
- }]
- }
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment