Event Tracking Service API (1.1)

Tracking of events of any type for logging and future analysis purposes

Tracking

Endpoints to capture events.

In each endpoint, the complete requested will be captured. Thus, additional query parameters and json properties in the request payload can be added on top of the ones described here.

Capture event

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters and all request headers (including CDP-specific cookies).

This endpoint then returns the string "OK".

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

user[type]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[id]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Btype%5D=).

user[id]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[type]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Bid%5D=).

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

clientId
string

The client identifier

siteId
string

The site identifier

type
string

The event type

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Capture event

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters, the body payload and all request headers (including CDP-specific cookies).

This endpoint then returns the string "OK".

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.
Request Body schema: application/json

Event to capture. Fields declared here take precendence over query parameters. The event can have more properties (nested properties as well) than the ones defined below.

clientId
string

The client identifier.

siteId
string

The site identifier.

type
string

The event type.

object

Overrides the request UserId which is extracted by Cookie by default.

It has less precedence than the id_{idType} query param.

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "siteId": "string",
  • "type": "string",
  • "user": {
    }
}

Capture event and redirect to URL

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters and all request headers (including CDP-specific cookies).

This endpoint then redirects to the given URL.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

user[type]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[id]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Btype%5D=).

user[id]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[type]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Bid%5D=).

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

ourl
required
string

The URL to which the browser will be redirected. This field must be URL-encoded.

clientId
string

The client identifier

siteId
string

The site identifier

type
string

The event type

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Capture event and redirect to URL

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters, the body payload and all request headers (including CDP-specific cookies).

This endpoint then redirects to the given URL.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

ourl
required
string

The URL to which the browser will be redirected. This field must be URL-encoded.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.
Request Body schema: application/json

Event to capture. Fields declared here take precendence over query parameters. The event can have more properties (nested properties as well) than the ones defined below.

clientId
string

The client identifier.

siteId
string

The site identifier.

type
string

The event type.

object

Overrides the request UserId which is extracted by Cookie by default.

It has less precedence than the id_{idType} query param.

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "siteId": "string",
  • "type": "string",
  • "user": {
    }
}

Capture event and redirect to unencoded URL

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters and all request headers (including CDP-specific cookies).

This endpoint then redirects to the given URL with some differences from the events/click endpoint. It deals with query parameters in a more permissive way. All query parameters declared after the ourl will be appended to the specified URL.

For example, the request /events/click0?a=1&ourl=http://test.com?b=1&c=1 will redirect to http://test.com?b=1&c=1, whereas with /events/click?a=1&ourl=http://test.com?b=1&c=1 would redirect to http://test.com?b=1.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

user[type]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[id]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Btype%5D=).

user[id]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[type]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Bid%5D=).

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

ourl
required
string

The URL to which the browser will be redirected. All query parameters defined after this will be added as query params to the URL defined here.

clientId
string

The client identifier

siteId
string

The site identifier

type
string

The event type

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Capture event and redirect to unencoded URL

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters, the body payload and all request headers (including CDP-specific cookies).

This endpoint then redirects to the given URL with some differences from the events/click endpoint. It deals with query parameters in a more permissive way. All query parameters declared after the ourl will be appended to the specified URL.

For example, the request /events/click0?a=1&ourl=http://test.com?b=1&c=1 will redirect to http://test.com?b=1&c=1, whereas with /events/click?a=1&ourl=http://test.com?b=1&c=1 would redirect to http://test.com?b=1.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

ourl
required
string

The URL to which the browser will be redirected. All query parameters defined after this will be added as query params to the URL defined here.

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.
Request Body schema: application/json

Event to capture. Fields declared here take precendence over query parameters. The event can have more properties (nested properties as well) than the ones defined below.

clientId
string

The client identifier.

siteId
string

The site identifier.

type
string

The event type.

object

Overrides the request UserId which is extracted by Cookie by default.

It has less precedence than the id_{idType} query param.

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "siteId": "string",
  • "type": "string",
  • "user": {
    }
}

Capture event and return image

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters and all request headers (including CDP-specific cookies).

This endpoint then returns a pixel image.

query Parameters
id_{idType}
string

Overrides the request UserId which is extracted by Cookie by default.

The {idType} should be replaced with the type of the UserId while the parameter value will be UserId's id itself.

user[type]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[id]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Btype%5D=).

user[id]
string

Overrides the request UserId which is extracted by Cookie by default.

It must be defined together with user[type]. It has less precedence than the id_{idType} query param. This query param must be sent url encoded (user%5Bid%5D=).

cookieCheck
string

If missing along with the adstax_uid Cookie, the request will be redirected to self to test cookie stickiness. The redirect will have this query param set to true.

clientId
string

The client identifier

siteId
string

The site identifier

type
string

The event type

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

header Parameters
Cookie
string
  • adstax_uid: CDP uid. If not present, a new one will be generated and set.

Responses

Capture event and parse it according to a template

Parses an event as JSON based on a template and converts it to an AdStax event.

This endpoint then returns the string "OK".

path Parameters
template
required
string

The id of the template to apply.

query Parameters
clientId
string

The client identifier

siteId
string

The site identifier

type
string

The event type

cookies
boolean
Default: true

If false, a new adstax_uid Cookie won't be generated if it is missing from the request.

Responses

Capture server-to-server event

This endpoint is meant to be used for server-side requests sent on behalf of the user. It does not derive any additional details from the HTTP request, such as from the request IP or headers, and instead allows user metadata to be optionally provided, such as: User-Agent and Referer Headers, IP, documentLocation, and referrer at the time of the request.

All the contents of the HTTP request are logged and indexed for future analysis. That includes the full URL with query parameters, the body payload and all request headers (including CDP-specific cookies).

This endpoint then returns the string "OK".

Request Body schema: application/json

Event to capture. The event can have more properties (nested properties as well) than the ones defined below.

clientId
string

The client identifier.

siteId
string

The site identifier.

type
string

The event type.

object

Overrides the request UserId which is extracted by Cookie by default.

It has less precedence than the id_{idType} query param.

userAgentHeader
string

The value of the User-Agent Header at the time the event was triggered on the user client.

refererHeader
string

The value of the Referer Header at the time the event was triggered on the user client.

For example: http://foo.com

documentLocation
string

The Document.location of the page the user was at when it made the event.

For example: http://foo.com/a/b/c.

referrer
string

URL of the page the user was at before traveling to the page where the event was made. This field can be obtained, for example, by using the window.referrer or the window.location.href methods in browsers.

For example: http://google.com.

ip
string

The user IP.

Responses

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "siteId": "string",
  • "type": "string",
  • "user": {
    },
  • "userAgentHeader": "string",
  • "refererHeader": "string",
  • "documentLocation": "string",
  • "referrer": "string",
  • "ip": "string"
}

Capture event and parse it according to a third-party source

Parses an event as JSON based on a third-party source and converts it to an AdStax event.

This endpoint then returns the string "OK".

path Parameters
source
required
string

The id of the third-party source to use.

Responses

Privacy

Endpoints to manage user privacy preferences.

Returns the current privacy status

The CDP privacy cookie is read if it exists and the current privacy status is returned.

Responses

Response samples

Content type
application/json
{
  • "status": "cookie",
  • "token": "string"
}

Opts out of user tracking

The CDP privacy cookie is updated so that future match requests for that user are ignored.

query Parameters
token
required
string

A token needed for alteration to the cookie privacy status. It must match the token found inside the cookie priv.

Responses

Response samples

Content type
application/json
{
  • "status": "cookie",
  • "token": "string"
}

Opts out of user tracking

The CDP privacy cookie is updated so that future match requests for that user are ignored.

query Parameters
token
required
string

A token needed for alteration to the cookie privacy status. It must match the token found inside the cookie priv.

Responses

Response samples

Content type
application/json
{
  • "status": "cookie",
  • "token": "string"
}

Opts in to user tracking

The CDP privacy cookie is updated so that future match requests are considered normally.

query Parameters
token
required
string

A token needed for alteration to the cookie privacy status. It must match the token found inside the cookie priv.

Responses

Response samples

Content type
application/json
{
  • "status": "cookie",
  • "token": "string"
}

Opts in to user tracking

The CDP privacy cookie is updated so that future match requests are considered normally.

query Parameters
token
required
string

A token needed for alteration to the cookie privacy status. It must match the token found inside the cookie priv.

Responses

Response samples

Content type
application/json
{
  • "status": "cookie",
  • "token": "string"
}