Brevo Tracker tracks website visitor behavior and identifies contacts. Once identified, contacts are automatically added to Brevo.
This guide demonstrates how to capture cart abandonments and target identified visitors through cart recovery emails after 2 hours of inactivity.
You can also track abandoned carts using plugins. Read more about this option here.
Brevo Tracker tracks all pages visited by your contacts. Once identified, contacts are automatically added to Brevo.

Copy the tracking code and paste it just before the </head> closing tag in your website. If you don’t have a </head> tag, add the script just before the <body> tag.
Visit your website to verify the tracker is installed. If installed correctly, the Tracking ID status shows as verified next to the Verify button.

After installation, send custom events when visitors perform actions on your website.
Page views are automatically tracked once Brevo Tracker is installed.
track() functionThe track() function sends custom events. It accepts three parameters:
The event name identifies the action being tracked.
For a visitor who adds items to their cart, use cart_updated as the event name.
Properties is a JSON object that describes the visitor’s state, such as email, age, gender, and location.
Pass user attributes (firstname, lastname, etc.) to the properties object to update the contact database in Brevo.
Properties and contact attributes have similarities:
Event data is a JSON object that contains information about a transaction. It has two optional entries:
id (optional): Unique identifier of the event. For example, the unique identifier of the cart object on your website, so each time the user adds an object to their cart, it’s reflected in Brevodata (optional): Any information related to your transaction. For example, the details of all products in the cartCall brevo.track() with an event name, properties, and event data to fire a track event.
For a cart update, fire the cart_updated track event each time a user clicks the update button.

Example implementation:
Abandoned cart workflows help recover potential lost sales.
Track these three events to build an abandoned cart workflow:
You’ve learned how to use Brevo Tracker to track website activity. The brevo.track() function accepts three types of entries:
cart_updated, order_completed, and cart_deleted.