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: 'EUR',
- value: '99.8',
- tax: '12.00',
- shipping: '4.95',
- transaction_id: '45734',
- customer_email: 'test@example.com', // customer email
- customer_telephone: '+32494222436', // customer telephone number (must always contain country code)
- coupon: 'blackfriday',
- items: [{
- item_name: 'Alpecin-Fenix Sweatpants 2022', // insert a product name
- item_id: 'CIT30283', // insert an actual product ID
- price: '49.90', // insert an actual product price. Number or a string. Don't include currency code
- item_brand: 'FDMKR',
- item_category: 'Team Alpecin - Fenix', // category of a product
- item_category2: 'Sweatpants', // subcategory of a product (type of clothing)
- item_variant: 'L', // variant of a product, if there are no variants, exclude this key from the dataLayer.push
- quantity: '1'
- },{
- item_name: 'Twisted hoodie', // insert a product name
- item_id: 'CIT30284', // insert an actual product ID
- price: '49.90', // insert an actual product price. Number or a string. Don't include currency code
- item_brand: 'FDMKR',
- item_category: 'Lifestyle', // category of a product
- item_category2: 'Hoodie', // subcategory of a product (type of clothing)
- item_variant: 'S', // variant of a product, if there are no variants, exclude this key from the dataLayer.push
- quantity: '1'
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement