Dev Request: Dev Request - Checkout
Instructions
Intro
When the Google Tag Manager library loads it declares a global JS object, dataLayer. It overloads the array prototype .push method so that it can grab on to objects/"events" pushed to that array.
Notes/Questions
- What values are possible there for customer.status?
- Populate customer.hubspot_canonical_vid, customer.auth0_id, chargebee_id if available. If not available, keep the key and use value javascript undefined.
Other Notes
data.value is the cart total (including tax and shipping, if any, minus any discounts) in whole currency units e.g. dollars not cents
data.currency is the 3 character currency code
data.discount_amount is number of total dollars discounted from the cart.
data.items.list_price is the undiscounted price per unit
data.items.unit_price is the discounts-applied price per unit
data.items.discount is the per-unit discount
data.items is an array e.g. contains multiple objects if there are multiple line items in the cart
Data Layer Event: checkout
Triggering Conditions
Occurs after selection of "checkout with card" on the index of sales.pdq.com.
followed by:
Event should fire after sequentially after route load of /checkout, if possible.
Event to Log
<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'checkout',
'data': {}
});
</script>
Description of Data Fields
checkout
Validation Schema does not have properties
JSON Validation Schema
For Super Techies:
The event payload, everything under the data property, will be validated against this schema. For more see JSONSchema standard.
{
"TBD": "TBD"
}