Overview
This article outlines the different methods for configuring Track Events. For more general information on this feature, please see the Track Events article.
Track Events allow you to 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 and properties. For example, a "Registered" event may have properties like plan or accountType.
There are three different ways to send Track Events to Pendo - Segment.com, Server Side, and Client Side.
Segment.com
More information on Pendo’s integration with Segment can be found in this article.
Server Side
API Requirements
For more documentation on Pendo’s API, click here.
- Access Level: Read-Write
- Method:
POST
- API Endpoint:
https://app.pendo.io/data/track
- Parameters: N/A
Request Body
type
: Must be "track" (required)event
: Name of the action that a user has performed (required)visitorId
: Unique string identifier for the visitor (required)accountId
: Unique string identifier for the account to which the visitor belongs (highly recommended)timestamp
: time (int64 in milliseconds after the epoch - epoch converter) that the event occurred (required)properties
: Free-form dictionary of properties of the event (optional)context
: Browser context provides useful context about the event. Required for a request, but can be left blank ("context":{}
)
Browser Context
Browser context provides useful context about the event.
ip
: Current user’s IP addressuserAgent
: User agent of the device making the request (recommended)url
: URL of the current page in the browser (optional)title
: Title of the current page in the browser (optional)
Responses:
200
: Track event was sent as requested
Sample Payload
{
"type": "track",
"event": "Registered",
"visitorId": "unique-string-id",
"accountId": "account-id-of-visitor",
"timestamp": 1524069206000,
"properties": {
"plan": "Pro Annual",
"accountType": "Facebook"
},
"context": {
"ip": "76.253.187.23",
"userAgent": "Chrome/65.0.3325.181",
"url": "https://mypage.com/admin",
"title": "My Page - Admin"
}
}
Client Side / Agent
This method allows you to pass track event information using the Pendo client/agent.
Input Format
pendo.track("NAME", {
PROPERTY1: "PROPERTY1VALUE",
PROPERTY2: "PROPERTY2VALUE",
PROPERTYN: "PROPERTYNVALUE",
...
});
Input Example
pendo.track("Registered", {
plan: "Pro Annual",
accountType: "Facebook"
});
FAQ/Troubleshooting
I sent my Track Event but it doesn’t appear on the Track Events page
It may take up to 15 minutes for the Track Event to appear on the Track Events page. You will also want to ensure the timestamp of the event is a date after your Pendo subscription was created.
How many Track Events can I send?
Pendo can handle a high volume of inbound Track Events. The only limit is one Track Event per Visitor per second.
How many Track Event types can I send?
Pendo supports up to 5,000 different Track Event types. Event properties can add additional details within those Track Event types.
How many Track Event properties can I send?
There is no hard limit for the number of properties that can be passed with a single Track Event type but, depending on the size of the data in the properties, a large number can cause degradation in performance. As a general guideline, 20 properties may cause performance issues if the strings are large and 50 properties will likely have performance issues. Strings should be less than 500 bytes.
I see pendo.track
is not a function in the console and the Track Event is not appearing on the Track Events page
This is due to the Track Event function running before the Pendo Agent has loaded. To check if the agent has loaded before the Track Event function is run, see example below:
function pendoTrack(name, data) {
if (pendo && pendo.isReady && pendo.isReady()) {
return pendo.track(name, data);
}
setTimeout(function() {
pendoTrack(name, data);
}, 500);
}
pendoTrack("NAME", { PROPERTY1: "PROPERTY1VALUE", ... });
I sent my track event and although I can see the track type on the Track Events page, the actual event is not showing up.
Pendo processes the previous hour’s data at the top of the hour and it may take up to 15 minutes for the data to fully appear in the UI. If you are looking for data from the current day, ensure that your are using the "Today" date range or that your date range includes the current day.
The timestamp of the event needs to be after the Track Type was created.
Some example timestamp issues that would cause this situation:
- Timestamp set to before the subscription was added
- Timestamp set to hours before the initial event was sent to create the track type – event time of 5 AM but event was sent/track type was created at 3 PM
- Timestamp set to day before the initial event was sent to create the track type - event date of 7/18 but event was sent/track type created on 7/19