Add Contact Event

POST https://event.api.drift.com/track

This method is what you call to send an event to Drift. All events are named and can have a list of attributes attached. You can send an event to Drift for companies or users by passing either the userId or the companyId.

{
  "orgId":0,
  "userId":"019mr8mf4r",
  "event":"Link Clicked",
  "attributes":{
    "linkUrl":"http://www.example.com"
  },
  "createdAt":"1441981033123"
}

POST https://event.api.drift.com/track/multi

This method is used to make bulk uploads of events to Drift. It works exactly the same as the /trackendpoint except that you can pass a list of events instead of just one. This is currently limited to 600 track objects.

[
  {
    "orgId":0,
    "userId":"019mr8mf4r",
    "event":"Link Clicked",
    "attributes":{
      "linkUrl":"http://www.example.com"
    },
    "createdAt":"1441981033123"
  },
  ...
]

orgId
number

The id of your organizations in Drift

userId
string, number

The unique user ID in your company's user table for the user.

companyId
string, number

The unique company ID in your company table for the company.

event
string

This is the name of this type of event. You should try to reuse the same events with different properties to describe similar actions such as Share or Link Clicked

attributes
object, optional

A dictionary of attributes about this type of event, such as shareType or linkUrl.

createdAt
number, optional

The unix timestamp in milliseconds that the event was created at. We will fill it in with the time we receive the event if you do not pass it.

The attributes object must be a flat object. Nested objects or arrays will not work.

Page Events - page (Reserved Event)

Any event that begins with page will be treated as a Page event. Page events should be fired when a user lands on a specific page.

name
string

The name of the page that the user has landed on, such as Homepage or Login Page

url
string

The url of the page that the user has landed on

Add Contact Event