The Brevo tracker is a powerful tool that connects Brevo apps (such as Automations, Segments, and Conversations) to your website. It monitors your website in real-time, allowing you to use Brevo to respond as visitors take actions like visiting certain pages or submitting forms. This helps you better understand and engage with your contacts.
If a plugin is not available for your website, or if you're not using a tag management system like Google Tag Manager, you can manually install the script directly on your website.
Before you start
If you don't know what the Brevo tracker is and how it works, check our dedicated article What is the Brevo tracker and how to install it?.
Step 1: Configure your cookie settings
Before installing the Brevo tracker on your website, you need to configure your cookie settings and decide if you want to use first-party or third-party cookies:
- In Brevo, go to Automations > Settings > Tracking code.
- Enable the Identify and track visitors option.
-
Select the type of cookies you want to use to track your website visitors:
[Recommended] First-party cookies - Identify and track visitors through the links in your emailsOnly your website tracks your visitors, keeping user data private by preventing third-party from accessing it. When first-party cookies are enabled, Brevo will add the parameters _sc for marketing emails and _se for transactional emails at the end of URLs that redirect to your website.
➡️ To learn more, check our dedicated help article Troubleshooting - Implementing first-party cookies on your website.
Third-party cookies - Identify visitors through a third-party trackerChoose to track your visitors through a third-party tracker.
Step 2: Copy the tracking code of the Brevo tracker and install it on your website
- Select the JS Tracker option.
- Copy the tracking code of the Brevo tracker under section A.
- Paste the tracking code into your website's code just before the </head> closing tag.
💡 Good to knowIf you can't find a </head> closing tag, add the tracking code just before the </body> tag.
The Brevo tracker has been added to your website.
Step 3: Identify your website visitors
Brevo can associate data collected by the Brevo tracker with a contact only if the visitor is identified. By default, when the Brevo tracker is installed, a cookie (visitor_id) is placed on the visitor's computer. The visitor can then be identified and associated with an existing contact in your Brevo account after they:
- Create an account or log in to your website.
- Click a link in a transactional email sent from Brevo, provided the link redirects to a page on your website.
- Submit a form created in Brevo.
In other words, the Brevo tracker can only identify contacts who have performed these specific actions.
(Optional) Identify other website visitors [Advanced]
The identify
method is an advanced functionality that allows you to identify website visitors who haven’t performed the actions described above. You can use multiple identifiers, such as email address, phone number, or WhatsApp number, to identify visitors. Additionally, this method allows you to update existing contact attributes in Brevo and create personalized automations.
➡️ To learn more about the identify
method, check our dedicated developer documentation for JS and REST.
Step 4: (Optional) Track custom events
The Brevo tracker, combined with the identify
method, is sufficient to build automations based on page visits or information collected during subscription. For more advanced tracking, you can create custom events to monitor specific actions by your website visitors, such as adding a product to their cart, completing a purchase, clicking a particular button, or finishing a lesson
➡️ To learn more, check our dedicated developer documentation for JS and REST.
Step 5: Verify that the Brevo tracker is working
Once you've installed the Brevo tracker on your website, verify that is it working and tracking your website visitors:
- Log in to your website and visit some pages to generate sample data for the Brevo tracker to track.
- In Brevo, go back to Automations > Settings > Tracking code.
- Click Verify at the bottom of the page.
You can now use the Brevo tracker to monitor your website activity in real-time, install our Conversations chat widget, create automations based on pages views, and more.
⏭️ What's next?
- Automatically send a welcome email to new contacts
- Create a segment to filter your contacts
- Install the Conversations chat widget and connect your communication channels
- Create a Web push campaign
🤔 Have a question?
If you have a question, feel free to contact our support team by creating a ticket from your account. If you don't have an account yet, you can contact us here.
If you’re looking for help with a project using Brevo, we can match you with the right certified Brevo expert partner.