Install the Brevo tracker using Google Tag Manager

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.

Google Tag Manager is a tag management system that allows you to add the Brevo tracker on your site without changing your website's code.

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:

  1. In Brevo, go to Automations > Settings > Tracking code.
  2. Enable the Identify and track visitors option.
  3. Select the type of cookies you want to use to track your website visitors:
    automations_brevo-tracker_cookies_en-us.jpg

    [Recommended] First-party cookies - Identify and track visitors through the links in your emails

    Only 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 tracker

    Choose to track your visitors through a third-party tracker.

Step 2: Copy the tracking code of the Brevo tracker

  1. Select the Google Tag Manager option.
    automations_brevo-tracker_gtm_option_en-us.jpg
  2. Copy the tracking code of the Brevo tracker under section D.

Step 3: Integrate the tracking code into Google Tag Manager

  1. Log in to your Google Tag Manager account.
  2. Select the container you want to configure.
  3. Go to Tags.
  4. Click New.
    automations_brevo-tracker_gtm_new-tag_en-us.jpg
  5. Enter a name for the tag (e.g., "Brevo tracker").
  6. Select the Custom HTML tag type.
  7. Paste the tracking code you copied during step 2 in the HTML field.
    automations_brevo-tracker_gtm_en-us.jpg
  8. Select the All pages trigger to install the Brevo tracker on all of your site's pagesscript-automation-EN-1.png
  9. Click Save.
  10. Click Submit to publish the container.

The Brevo tracker has been added to your website. 

Step 4: 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 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:

  1. Log in to your website and visit some pages to generate sample data for the Brevo tracker to track.
  2. In Brevo, go back to Automations > Settings > Tracking code.
  3. 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.

💡 Good to know
If the Brevo tracker doesn't work, you'll see the error message "❗ We could not detect the script, Please try to install it again.". In that case, check the tag configuration in Google Tag Manager. If you have a question, feel free to contact our support team by creating a ticket from your account and including a screenshot of the tag configuration.

⏭️ What's next?

🤔 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.

💬 Was this article helpful?

9 out of 15 found this helpful