Checkout events
Overview
The Checkout event represents the customer journey as they navigate through the checkout process.
An event triggered once the checkout process begins for the customer, typically on the page, the customer navigates to after pressing the checkout button.
Parameters
Parameter | Data type | Description |
---|---|---|
| object | The order associated with this checkout. |
'product` | array | Products that are a part of the order. |
| boolean | True/False flag for ensuring the |
Example
affirm.analytics.trackCheckoutStarted({
"storeName": "Affirm Store",
"coupon": "SUMMER2018",
"currency": "USD",
"discount": 0,
"revenue": 2920,
"shipping": 534,
"tax": 285,
"orderId": "T12345",
"total": 3739
}, [{
"brand": "Affirm",
"category": "Apparel",
"coupon": "SUMMER2018",
"name": "Affirm T-Shirt",
"price": 730,
"productId": "SKU-1234",
"quantity": 1,
"variant": "Black"
}, {
"brand": "Affirm",
"category": "Apparel",
"coupon": "SUMMER2018",
"name": "Affirm Turtleneck Sweater",
"price": 2190,
"productId": "SKU-5678",
"quantity": 1,
"variant": "Black"
}]);
An event triggered when the customer views a distinct checkout step that is part of the checkout process.
Parameters
Parameter | Data type | Description |
---|---|---|
| integer | An incrementing number representing the current step in the checkout process. |
| object | The order associated with this checkout. |
boolean | True/False flag for ensuring the |
Example
affirm.analytics.trackCheckoutStepViewed(1, {
"storeName": "Affirm Store",
"coupon": "SUMMER2018",
"currency": "USD",
"discount": 0,
"revenue": 2920,
"shipping": 534,
"tax": 285,
"orderId": "T12345",
"total": 3739
});
An event triggered when the customer completes a distinct checkout step that is part of the checkout process.
Parameters
Parameter | Data type | Description |
---|---|---|
| integer | An incrementing number representing the current step in the checkout process. |
| object | The order associated with this checkout. |
| boolean | True/False flag for ensuring the |
Example
affirm.analytics.trackCheckoutStepCompleted(1, {
"storeName": "Affirm Store",
"coupon": "SUMMER2018",
"currency": "USD",
"discount": 0,
"revenue": 2920,
"shipping": 534,
"shippingMethod": "Fedex",
"tax": 285,
"orderId": "T12345",
"total": 3739
});
An event triggered when the customer
Parameters
Parameter | Data type | Description |
---|---|---|
| integer | An incrementing number representing the current step in the checkout process. |
| object | The order associated with this checkout. |
| boolean | True/False flag for ensuring the |
Objects
Order
Represents a single customer's checkout transaction. This includes parameters related to the transaction once the customer completes their checkout.
Parameter | Description | |
---|---|---|
storeName | string | The name of the store responsible for this transaction. (e.g. Affirm Store). |
checkoutId | string | A unique identifier representing the checkout, if it is conceptually distinct from an order. Otherwise only the |
couponCode | string | The coupon code applied to the order (e.g., SUMMER2018). |
currency | string | The local currency for all transaction currency values. Value should be a valid subset of ISO 4217 currency code. |
discount | integer | The total discount associated with the transaction. The value must be non-negative and represented in minor units, such as cents instead of dollars. |
orderID | string | A unique identifier representing the order/transaction. |
paymentMethod | string | The payment method chosen by the customer for the transaction (e.g. Visa). |
revenue | integer | Revenue associated with transaction, excluding shipping, total tax and discounts. The value must be non-negative and represented as cents instead of dollars. |
shipping | integer | The shipping cost associated with the transaction. |
shippingMethod | string | The shipping method chosen by the customer for the transaction (e.g. Fedex). |
tax | integer | The total tax associated with the transaction. The value must be non-negative and represented in as cents instead of dollars. |
total | integer | The total value of the transaction, including tax and shipping. If not sent, this value will be automatically calculated using the product quantity and price fields of all products in the same hit. The value must be non-negative and represented as cents instead of dollars. |
Product
Represents any offered product or service.
Parameter | Description | |
---|---|---|
brand | string | The brand of the product (e.g., Affirm). |
category | string | The category the product belongs to (e.g. Apparel). |
coupon | string | Any coupon code associated with the particular instance of this product. |
name | string | The full name of the product (e.g., Affirm T-Shirt). |
price | integer | The price of the product. The value must be non-negative and represented as cents instead of dollars. |
productID | string | A unique identifier representing the product, such as the SKU or an internal database identifier used by the merchant. |
quantity | integer | The quantity of the product. The value must be non-negative. |
variant | string | The variant of the product (e.g. black). |
currency | string | A currency code associated with this product (USD) |
Updated about 1 year ago