Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.dataLayer = window.dataLayer || [];
- window.dataLayer.push({
- event: 'purchase', // name of the event. In this case, it always must be purchase
- ecommerce: {
- currency: 'ARS',
- value: 325.00, // order total (price of all products + shipping)
- tax: 25.00, // tax
- shipping: 200.00, // shipping costs
- affiliation: 'Cigarrillos Online', // affiliation (e.g. affiliate id, name of the store, etc.)
- transaction_id: 'CIGALO19283', // transaction id
- coupon: 'Black_Friday22', // if coupon was applied to the order, include it here
- items: [{ // an array with all products (that were in a cart when the checkout began)
- item_name: 'MARLBORO RED SUMMIT', // insert an actual product name
- item_id: 'MLB1985', // insert an actual product ID
- price: '325.00', // insert an actual product price. Number or a string. Don't include currency code
- item_brand: 'Marlboro', // insert an actual product price
- item_variant: 'RED SUMMIT', // insert an actual product variant
- quantity: '1' // product quantity in the cart
- },{
- item_name: 'JUMBO PACK PHILIP MORRIS MIX&MATCH',
- item_id: 'PMI_JUM_PACK2938',
- price: '540.00',
- item_brand: 'Philip Morris',
- item_variant: 'JUMBO PACK',
- quantity: '1'
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement