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: 'USD',
- value: 29.98, // order total (price of all products)
- transaction_id: 'abc123', // transaction id
- items: [{ // an array with all products
- item_name: 'Product 1', // insert an actual product name
- item_id: 'product1', // insert an actual product ID
- }]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement