HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Tracking API

Describes the Tracking API for Optimizely Profile Store, which provides the endpoint for tracking of statistics.

Data is sent to the tracker as track events. The Tracking API is used for recording track events, whereas the Profile Store API is used for querying track events. The Profile Store API is separated from the Tracking API so that it has independent processing loads.

Authentication

Use the Authorization header for authentication with a value in the following format: epi-single key; it contains the subscription key that is passed to the tracker with each request.

Endpoints

Post is the default and preferable method to track, and allows sending additional payload data.

You can track and send single or batch messages to and from the Tracking API. Batch tracking works the same way as single tracking, and takes a list of track events. You can have up to 100 track events in each batch, with a limit of 256KB for each track event.

Endpoint for tracking API single track event is POST https://example.com/api/v1.0/Track.

{
  "user"          : {
                      "name"  : "string",
                      "email" : "string",
                      "info"  : {}
                    },
  "payload"       : {},
  "deviceId"      : "string",
  "eventType"     : "string",
  "value"         : "string",
  "pageUri"       : "string",
  "pageTitle"     : "string",
  "eventTime"     : "2017-09-19T08:24:19.996Z",
  "scope"         : "scope name",
  "remoteAddress" : "client IP address"
}

Endpoint for tracking many events in batches is POST https://example.com/api/v1.0/TrackBulk.

[
  {
    "user"          : {
                        "name"  : "string",
                        "email" : "string",
                        "info"  : {}
                      },
    "payload"       : {},
    "deviceId"      : "string",
    "eventType"     : "string",
    "value"         : "string",
    "pageUri"       : "string",
    "pageTitle"     : "string",
    "eventTime"     : "2017-09-18T14:23:28.340Z",
    "remoteAddress" : "100.100.100.1"
  },
  {
    "user"          : {
                        "name"  : "string",
                        "email" : "string",
                        "info"  : {}
                      },
    "payload"       : {},
    "deviceId"      : "string",
    "eventType"     : "string",
    "value"         : "string",
    "pageUri"       : "string",
    "pageTitle"     : "string",
    "eventTime"     : "2017-09-19T08:24:19.996Z",
    "remoteAddress" : "100.100.100.2"
  }
]