Track Events

Track events from your server. Please include at least one of: userId, externalId, or email. These properties help us associate events with existing users. For all fields, null values unset the property and undefined values do not unset existing properties.

POST
/track

The payload to track an event

eventstring

The name of the event you're tracking. This must be whitelisted in the Ours dashboard.

Length1 <= length <= 1000
tokenstring

The token for your Ours Privacy Source. You can find this in the Ours dashboard.

Length1 <= length <= 250
userId?string|null

The Ours user id stored in local storage and cookies on your web properties. If userId is included in the request, we do not lookup the user by email or externalId.

Length1 <= length <= 400
externalId?string|null

The externalId (the ID in your system) of a user. We will associate this event with the user or create a user. If included in the request, email lookup is ignored.

Length1 <= length <= 400
email?string|null

The email address of a user. We will associate this event with the user or create a user. Used for lookup if externalId and userId are not included in the request.

Length1 <= length <= 1000
time?number|null

The time at which the event occurred in milliseconds since UTC epoch. The time must be in the past and within the last 7 days.

distinctId?string|null

A unique identifier for the event. This helps prevent duplicate events.

Length1 <= length <= 400
eventProperties?|null

Any additional event properties you want to pass along.

userProperties?|null

Properties to set on the visitor. (optional) You can also update these properties via the identify endpoint.

defaultProperties?|null

These properties are used throughout the Ours app to pass known values onto destinations

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.oursprivacy.com/api/v1/track" \  -H "Content-Type: application/json" \  -d '{    "event": "string",    "token": "string"  }'
{
  "success": true
}
{
  "success": false
}
{
  "success": false
}
{
  "success": false
}
{
  "success": false
}

How is this guide?