Created
August 23, 2021 14:58
-
-
Save kmclaugh/94306c26e24496abea8c9ac996f6cded to your computer and use it in GitHub Desktop.
Wrapmate Purchases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* action: purchase | |
* description: fire when the user actually completes the expressway purchase | |
*/ | |
window.dataLayer = window.dataLayer || []; | |
window.dataLayer.push({ | |
event: "eec.purchase", | |
customerId: "{{customerId}}", // the customer id if available at purchase | |
eecEventName: "Purchase", | |
ecommerce: { | |
currencyCode: "USD", | |
purchase: { | |
actionField: { | |
id: "{{checkout.order_number}}", // 12345 // The order number or transaction id | |
affiliation: "Wrapmate", | |
revenue: | |
'{{amount}}', // 11.00 // the total transaction value | |
tax: '{{tax}}', // 1.0 // the tax paid | |
coupon: "{{discount.code}}", // SUMMER2020 // any discount code used | |
}, | |
products: [], | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment