eCommerce tracker events
Tracker events help you learn more about your customers by analysing how they interact with your marketing initiatives. This lets your eCommerce business automate sales processes and track customer-interaction metrics. This guide covers the integration between eCommerce and the frontend tracker events.
For steps to integrate the eCommerce API with various plugins, see the help articles. For Shopify, see this article.
How cart and order events are processed
How Brevo processes an event depends on the endpoint you send it to:
Cart event payloads
Cart events use the same structure whether you send them with the tracker or the REST endpoint:
event: the event name (cart_updatedorcart_deleted)properties: contact attributes to update, such asFIRSTNAMEeventdata.id: a unique ID for the cart, for examplecart:1234. Use the same ID for every event about the same cart.eventdata.data: the cart details described below
Brevo stores the fields of eventdata.data as the event’s properties, together with eventdata.id as id. Brevo doesn’t validate these fields, but ecommerce features such as email templates, segmentation and product recommendations read them using the names and types below.
cart_updated
Send cart_updated every time the cart is created or changed, with the full current content of the cart.
Send amounts as numbers rather than strings.
cart_deleted
Send cart_deleted when the cart is emptied or removed. Only the cart ID is needed:
Purchases
Record each purchase with Managing the status of the order. Brevo stores it as an order_created ecommerce event, which ecommerce automations use to detect purchases.
Each call to this endpoint is stored as a new order_created event, whatever the status, including a status change such as cancelled or refunded. A workflow that starts when a contact places an order and lets contacts enter again can therefore start again for each status change of the same order. Send status changes only when you need them, or don’t let contacts enter that workflow again.
You can also send an order_completed event with the tracker, for example when a workflow uses it as an exit condition. Brevo stores order_completed as a custom event, and its eventdata.data fields are stored under data. (for example data.total).
Session data of orders
When a user logs in and browses the store, they start a session that persists for the duration of their visit. Without logins or users, there is no session data. The order is automatically updated if an identify call is made on the frontend for the same email. Some frontend data fields for a given event are listed below.
View the session data for orders in your Brevo account under the Automation logs. Any change to the cart appears in the Automation logs in your Brevo account. You can retrieve data such as session_id, session_timezone, and session_city.
Cart events and Automation
Once the cart is used, all session data, frontend events, and data appear in your Automation tab logs. The plugin is responsible for sending the data to Automation. If the plugin is integrated correctly, the store session is identified, the order is processed quickly, and it appears on the logs page. If the identify call does not arrive on the frontend, it takes about 5 minutes for the order or cart updates to appear in the Automation logs.