For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Getting started
    • Overview
    • Quickstart
    • Authentication
    • Rate limits
  • Messaging API
    • Send transactional email
    • Send transactional SMS
    • Send transactional WhatsApp
  • Marketing Platform
    • Manage your contacts
    • Track website activity
    • Send WhatsApp campaigns
    • Weekly event exports
  • Webhooks
    • Getting started
    • Conversations webhooks
    • Payment webhooks
    • Marketing webhooks
    • Transactional webhooks
    • Loyalty webhooks
    • Batched webhooks
    • Secure webhook calls
    • Meetings and phone webhooks
    • Push notification webhooks
    • Sales CRM webhooks
  • Conversations
    • Getting started
    • Customize the chat widget
    • JavaScript API reference
    • REST API reference
    • Conversations webhooks
  • eCommerce
    • Activate eCommerce app
    • Manage product categories
    • Manage products
    • Manage orders
    • Coupon collections
    • eCommerce tracker events
  • Loyalty
    • Overview
    • Set up a program
    • Enroll members
    • Credit & debit points
    • Read member data
    • Best practices
  • Custom Objects
    • Custom objects management
  • Brevo tracker and events
    • Getting started
    • JavaScript implementation
      • Identify users
      • Track page views
      • Track link clicks
      • Track custom events
    • REST implementation
    • Legacy tracker documentation
    • Events
  • Accounts and settings
    • Senders and domains
    • User activity logs
    • External feeds
    • Invited users
LogoLogo
Help CenterAPI KeysStatusSign In
On this page
  • Manual installation
Brevo tracker and events

JavaScript implementation

Was this page helpful?
Previous

Identify users

Next
Built with
Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

This is the most direct implementation if you need to track all events on your website. Set up a short JS snippet on your site and Brevo starts tracking your users and page views.

If you use one of our plugins (Wordpress, Prestashop) or Google Tag Manager, no development is required to get the tracking running.

There are two ways to implement JavaScript: through the JavaScript tracker code or through Google Tag Manager.

This section explains how to implement the tracker with JavaScript. This is the recommended installation. For another approach, see the REST implementation.

This section covers the manual installation only: add the JS snippet on your website to start tracking activity.

To install the Brevo tracker using Google Tag Manager, see this article.

If you use one of our plugins, you don’t need to install this snippet — it is already included. See this article for details.

Manual installation

Copy and paste the script from your Brevo account at Automation > Settings. It looks like this:

1<script src="https://cdn.brevo.com/js/sdk-loader.js" async></script>
2<script>
3 // Version: 2.0
4 window.Brevo = window.Brevo || [];
5 Brevo.push([
6 "init",
7 {
8 client_key: "YOUR_CLIENT_KEY",
9 // Optional: Add other initialization options, see documentation
10 }
11 ]);
12</script>

Paste it into your website’s code just before the </head> closing tag.