Track

The track API call is how you record any actions your users perform, along with any properties that describe the action.

Each action is known as an event. Each event has a name, like Registered, and properties, for example a Registered event might have properties like value or id.

Field Type Description
id String (Optional) Unique identifier if event has one. For example, order event would have an order id that could be used here.
value Integer (Optional) Conversions value. For example revenue, margin, etc. This will be used to calculate ROI and attribution.
// track order event
dripit.track("order", {
  value: 49999
});

// tracking blog views. Passing `id` parameter will allow Dripit to 
// aggregate statistics about individual article performance
dripit.track("blog", {
  id: 'Awesome blog title'
});

// or track simple event without any parameters
dripit.track("Newsletter Singup");
Field Type Description
token String Project token from users Dripit integration page
event_type String Event name
anonymous_id String Pseudo unique identifier visiting your web site
user_id String (Optional) Shorthand for identify. Unique identifier for the user in your database A userId or anonymousId is required
id String (Optional) Unique identifier if event has one. For example, order event would have an order id that could be used here.
value Integer (Optional) Conversions value. For example revenue, margin, etc. This will be used to calculate ROI and attribution.
curl -H "Content-Type: application/json" 
     -X POST 
     -d '{
       "token":"shop_token", 
       "event_type":"order", 
       "anonymous_id": "022bb90c-bbac-11e4-8dfc-aa07a5b093db", 
       "value": 49999,
       "resource_id": "431256543"
     }' 
     https://api.dripit.com/api/event

results matching ""

    No results matching ""