CONFIRM event
The event data object for a CONFIRM event must include all the required attributes for event data objects plus the following attributes:
Attribute |
Type |
Description |
Example |
---|---|---|---|
|
array of objects |
A list of objects, where each object contains the item ID of the product that the user added to the cart. Use the item ID from |
RequestResponse
|
After you create this event data object, you can optionally extend this event using the extension data object. Then, you can send the event using the Engage.event()
function.
Here's an example of the event data object for a CONFIRM event.
const eventData = {
channel: "WEB",
currency: "EUR",
pointOfSale: "myretailsite/ireland",
language: "EN",
page: "checkout",
product: [
{ item_id: "SHOES_8475GHT" }
]
}
Here's an example of how multiple product item IDs are linked in ADD and in CONFIRM event data objects.
For each item ID included in an object in the product
array of the CONFIRM event data object, there must be a preceding ADD event data object where the product item ID is specified in product.item_id
.
// ADD event data object for "SHOES_8475GHT"
const addEventData = {
// ...
product: {
// ...
item_id: "SHOES_8475GHT"
}
}
// ADD event data object for "JEANS_W33L31"
const addEventData = {
// ...
product: {
// ...
item_id: "JEANS_W33L31"
}
}
// CONFIRM event data object listing all product item IDs
const confirmEventData = {
// ...
product: [
{ item_id: "SHOES_8475GHT" },
{ item_id: "JEANS_W33L31" }
]
}