track

Track user events.

❗️

JSON expected

All Attribution server-side endpoints expect JSON

If you don't have userId but still want to track event for anonymous user from server-side you need to pass anonymousId which will contain anonymous cookie id. You can get from JavaScript on a website by calling:

Attribution.user().anonymousId();

A note on Authorization header

Attribution app uses a HTTP Basic Authorization for all server-side functions.

Your HTTP request must contain Authorization header that must include username being your Project ID from Attribution app settings and blank password.

Body Params
string
required
Defaults to track

Type of event, must be always set to track.

string
required
Defaults to Test Event

Event name to track.

date-time

Timestamp when the event happened, defaulted to the current time if not passed. Use ISO 8601 format, example 2024-01-15T23:10:05Z.

string

Attribution snippet generated cookie id, see identify doc for more info. anonymousId and/or userId must be present.

string
Defaults to test_123

Unique identifier for the user in your database. anonymousId and/or userId must be present.

string

Unique identifier for each event you send. Events with repeating messageId would be ignored.

properties
object

Additional event properties you want to send, use revenue property to track purchase or order amount.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json