Track custom events

📘

Legacy Tracker Documentation

For the legacy tracker doc, check our guide here.

This endpoint lets you to capture events and additional information about the events. A cURL request is mentioned below:

curl --request POST \
     --url https://in-automate.brevo.com/api/v2/trackEvent \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'ma-key: YOUR_MA_KEY' \
     --data '
{
    "email": "[email protected]",
    "event": "cart_updated",
    "properties": {
        "additionalProp": "additional property"
    },
    "eventdata": {
        "data": {
            "added_product": [
                {
                    "currency": "EUR",
                    "name": "Wrist watch",
                    "type": "accessories",
                    "price": "50.00"
                }
            ]
        }
    }
}
'

You can choose any value you want for the field event and pass any key-value in the field properties. Make sure not to use any reserved key (email or event) in the properties object. The attributes to track events are defined in the table below:

AttributeDatatypeDescriptionValue
emailStringEmail to identify the user[email protected]
eventStringEvent to track"item_deleted"
propertiesObjectContains your custom fields. These user properties will populate your contact databaseSee example above
eventdataObjectContain the data you want to pass about the eventSee example above

Response

Response codeMessageDescription
204Event has been tracked successfullyNo content is shown in the JSON response but the event has been tracked
400Bad requestBad request occurs due to out_of_rangeModel, invalid_parameter, missingParameter