JS Implementation
Legacy Tracker Documentation
For the legacy tracker doc, check our guide here.
This is the most straightforward implementation if you need to track all the events happening on your website. All you have to do is to set up a short JS snippet on your website and we will start tracking your user along with the page views for you.
If you're using one of our plugins (Wordpress, Prestashop) or Google Tag Manager it's even easier, you don't need to do any development to get the tracking working.
There are two ways to implement Javascript, through the Javascript tracker code and Google Tag Manager.
In this section we’ll explain how to implement the tracker with Javascript. This is the recommended installation, but if you’re looking for another type installation, you can check the REST implementation.
In this section we’ll cover the manual installation only: you will need to add the JS snippet on your website and all activities will start to be tracked.
If you’re willing to install the Brevo tracker using Google Tag Manager, you can check this article.
If you’re using one of our plugins, you don’t need to install this snippet on your side: it is already included in it. You can check this article for more details.
Manual Installation
All you have to do is to copy paste the script that is on your Brevo account, in Automation > Settings. It looks like this:
<script src="https://cdn.brevo.com/js/sdk-loader.js" async></script>
<script>
// Version: 2.0
window.Brevo = window.Brevo || [];
Brevo.push([
"init",
{
client_key: "YOUR_CLIENT_KEY",
// Optional: Add other initialization options, see documentation
}
]);
</script>
You can paste it into your website's code just before the </head>
closing tag.
Updated 16 days ago