Hello,
Today (maybe yesterday depending on the timezone) Brevo introduced the V2 javascript tracking. I tried the example code in the documentation, so my code should work. But it does not work at all.
<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: "xy",
// Optional: Add other initialization options, see documentation
}
]);
var event_name = "cart_updated";
var properties = {
"email": "john.doe@email.com",
"FIRSTNAME": "John",
"LASTNAME": "doe"
}
var event_data = {
"id": "cart:1234",
"data": {
"total": 280,
"currency": "USD",
"url": "www.example.com",
"items": [{
"name": "Black shoes",
"price": 90,
"quantity": 2,
"url": "www.example.com/black-shoes",
"image": "www.example.com/black-shoes.jpg"
}
]
}
}
Brevo.push([
"track",
{
event_name, /* mandatory */
properties, /* optional */
event_data /* optional */
}
]);
</script>
And I get:
sa.js?key=xy:117 POST https://in-automate.brevo.com/p 400 (Bad Request)