Documentation Center

Tracking Custom Attributes

Custom attributes allow users to add custom information to their subscribers to be used for segmentation and in turn targeted notifications.

Custom attributes can be added with our Javascript API or the REST API.

 

Option #1 - Javascript API

You may add a custom attribute the current subscriber at any point by calling the _aimtellTrackAttributes javascript function. Below is an example.

<script>
_at.track("attribute", {"age" : "35", "name":"david"})
</script>

 

Option #2: REST API

To add the custom attributes via a REST call check out our documentation at https://developers.aimtell.com. Essentially you will just need to make an authenticated call and pass the custom data like the example below.

curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
"idSite": "1",
"subscriber_uid": "5059b0a2-747d-0f74-73c4-24c8442de237",
"attributes": {
"first_name" : "jeff",
"gender" : "male"
}
}' 'https://api.aimtell.com/prod/subscriber/'

 

Verifying Attributes Are Being Recorded

To help in debugging event tracking, you can check out your logs under "Logs" -> "Attribute Logs" in your dashboard.