Twilio Segment integration overview

Last updated:

This article explains how Pendo integrates with Twilio Segment (herein, Segment), which is a Customer Data Platform (CDP) that collects, cleans, stores, and routes customer data from various sources. If, instead, you're looking for information related to segmenting your visitors and accounts in Pendo, see the Segments article.

How it works

Segment is a centralized platform for managing customer data across multiple channels, such as websites, mobile apps, and third-party applications. It offers tools for tracking user interactions, segmenting audiences, and integrating with other marketing and analytics tools, including Pendo.

Segment uses API calls to send data from your application or website to Segment’s servers. These calls allow you to collect information about user interactions, events, and attributes, which can then be routed to various Segment Destinations, including Pendo.

By default, we map the following:

  • Segment User IDs to Pendo Visitor IDs
  • Segment user traits to Pendo visitor metadata
  • Segment Group IDs to Pendo Account IDs
  • Segment group traits to Pendo account metadata
  • Segment Tracks to Pendo Track Events

We pass this information both on initialization and in the Segment actions (Pendo events). You can customize some of this information. For more information and setup instructions, see Install Pendo through Twilio Segment.

You can also set up the Pendo Source to send data from Pendo to Segment. The Pendo Source in Segment is a specific type of webhook that sends information from Pendo to Segment, triggered by an event rather than an API call.

API calls in Segment

The Segment Spec lists six API calls for capturing data, which it can then route to other tools, such as Pendo. Pendo supports three of these API calls (identifygroup, and track), allowing you to map the data captured in Segment to data concepts in Pendo: Visitor IDs, Account IDs, and Track Events.

API call Description Pendo metadata
identify Used to associate traits and properties with a specific end user. identify calls map onto Pendo visitors. When we integrate with Segment, we pass user information from the identify call onto Pendo and associate this information with Visitor IDs.
group Used to associate a user with a particular group of end users. group calls map onto Pendo accounts. When we integrate with Segment, we pass user information from the group call onto Pendo and associate this information with Account IDs
track Used to record specific actions (events) that users make within an application or websites track calls map onto Pendo Track Events. When we integrate with Segment, we pass actions from the track call onto Pendo as a Track Event.

Identify calls

An identify call maps a user to their actions and records traits about them. userID maps onto Visitor ID in Pendo and user traits become metadata belonging to Visitor IDs.

Group calls

group calls are required if you use Pendo account data. A group call associates users in Segment to accounts and account metadata in Pendo. groupID maps onto Account ID in Pendo and group traits become metadata belonging to Account IDs.

Track calls

track calls are used to record your user actions (events in Pendo), along with any properties that describe the action (event properties in Pendo). track becomes Track Events in Pendo.

The Pendo Actions Destination in Segment

Pendo uses the Pendo Web (Actions) Segment Destination receive data from Segment. This is different from the classic Pendo Destination, which had more restricted functionality. To set up the Pendo Web (Actions) Destination, follow the instructions in Install Pendo through Twilio Segment.

The Actions Pendo Destination relies on Segment’s Destination Actions framework, which allows you to control how Segment sends event data to your Pendo Web (Actions) Destination. With this framework, Actions determine what information is sent to your destination, and which event types, names, and properties trigger an Action.

The Pendo Source in Segment

While Destinations receive data from Segment, Sources send data into Segment. The Pendo Source is an event Source, which means that Pendo sends data as events created by visitors at a particular point in time. 

To set up the Pendo Source, you must first generate a unique identifier for the Pendo Source in Segment, and then add the Source as a webhook in Pendo.

Step 1. Set up Pendo Source Segment

  1. From the Sources page in Segment, select Add Source.
  2. In the Sources Catalog, Search for Pendo.
  3. Select Connect.
  4. Give the Source a meaningful name that distinguishes between your environments, such as “Pendo_Prod”. This is used to designate the Source in the Segment interface. Segment creates a related schema name, which is the namespace you query against in your data warehouse. 
  5. Follow the setup flow.
  6. Copy the Write Key. You need this for Step 2.

Step 2. Set up Segment webhooks in Pendo

  1. In Pendo, navigate to Settings > Integrations > Webhooks.
  2. Select Add Webhook.
  3. Give the webhook a meaningful name.
  4. In the Type dropdown menu, select Segment.com.
  5. Enter your Segment Write Key.
  6. Select the events you want to send to Segment.
  7. Select Save Webhook.
  8. In the Webhooks table, ensure the webhook is active using the toggle in the Enabled column.
Was this article helpful?
0 out of 6 found this helpful