Server-Side Event Tracking
Kevel Audience provides an HTTP API to collect events from a server. This API ignores client-related data in the HTTP request, such as the user IP, and provides an interface to specify user-related data, such as the User-Agent
header, to avoid extracting wrong information from the request that relates to a server and not a user, and thus degrading user profiles.
For example, the IP is extracted from the HTTP headers in tracking events sent directly from your website, whereas in server-to-server events it is obtained via a parameter.
Additionally, the server-to-server API accepts an optional timestamp
parameter, allowing you to specify the
original timestamp of the event. For more details, please refer to the Event Tracker API.
- The event's
timestamp
maximum drift is 24 hours. Events that have occurred more than 24 hours ago will be rejected. The same applies for events whose timestamp is higher than their reception time in the server. - The timestamp must comply with the following ISO 8601 format:
YYYY-MM-DD'T'hh:mm:ss[.sss]Z
.
POST http://tr.cdp.<WEBSITE_DOMAIN>/events/server
Content-Type: application/json
{
"type": "pageView",
"siteId": <SITE_ID>,
"clientId": <CLIENT_ID>,
"user": {
"type": <ID_TYPE>,
"id": <ID>
},
"ip": <USER_IP>,
"documentLocation": <DOCUMENT_LOCATION>,
"timestamp": <TIMESTAMP>
}
API Reference
For more technical details see the API Reference.