REST Implementation
Implementing the Brevo Tracker through the REST API
Legacy Tracker Documentation
For the legacy tracker doc, check our guide here.
Below and in the next pages are described how to use the REST API to implement the Brevo Tracker features. However, keep in mind the JS implementation is easier and allows you more things, for example:
- The Javascript tracker tracks the page views for you and it is an automated process while in REST implementation you will have to run the events yourself.
- We won't be able to track the users who clicked on your emails.
- For REST implementation, you will have to pass email to the call because this would identify the users.
Combining the REST and the JS implementation
You can totally combine the two tracking technologies: JS and REST. For example, you can use the JS on the client side to identify and track users’ behaviours on your website and your can use REST implementation on the server side, to track orders.
Authentication
The REST implementation requires a key, shown as client_key
below, to authenticate. You can get it from your Brevo account.
<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>
Updated about 2 months ago