This article explains how Pendo integrates with Segment to send data to Pendo. For more information about this integration, see Twilio Segment integration overview. If you're looking for information related to segmenting your visitors and accounts in Pendo, read the article on Segments.
Segment is a Customer Data Platform (CDP) that combines data from multiple tools to create a centralized customer database that simplifies the overall data collection process. If you have Segment installed in your application, you can add Pendo to the same application through Segment. This allows you to send data in Segment to Pendo and other integrated tools.
This replaces the standard Pendo implementation method outlined in the Developer's guide to implementing Pendo using the install script.
How it works
A standard Segment implementation involves sending user and account information to Segment. You can pass that data on to Pendo with no additional coding by adding Pendo Web (Actions) as a destination in Segment to forward data to.
The setup involves copying and pasting your Pendo API key into Segment settings. After the destination is set up, Segment uses the API key to initialize Pendo in your application.
By default, we map Segment User IDs to Pendo Visitor IDs, Segment user traits to Pendo visitor metadata, Segment Group IDs to Pendo Account IDs, and Segment group traits to Pendo account metadata. We also map Segment events and properties to Pendo's events and metadata. We pass this information both on initialization and in the Segment actions. You can customize this information. For more information, see Customize mappings.
Step 1. Find and copy your Pendo API key
To find your Pendo API key:
- Go to Settings > Subscription Settings.
- Open the Applications tab.
- Find and open the relevant app from your Applications list. The App Details tab is open by default. For information about the settings in this page, see Web application settings.
- Under Basic Settings, find and copy the value for API Key.
You can also find the API key from the Install Settings tab. The key is the string at the bottom of your install script.
Step 2. Add the Pendo Web (Actions) destination
Add Pendo as a destination from the Segment application.
- From your Segment workspace, find and select Add destination. You can find this option on the Connections homepage, from the Destinations list, or from a Source overview page.
- Select Destination Actions and then find and select the Pendo Web (Actions) destination in the catalog. This opens a destination summary page.
- Select Add destination.
- Choose which existing Source in Segment should send data to the Pendo Web (Actions) destination.
- Select Confirm source. This opens the destination's settings page.
- Complete all required fields for destination settings including the Name, Pendo API Key (identified as part of Step 1), and Region.
- Optionally, if you've set up CNAME for Pendo, enter a CNAME content host to update your Pendo install script. It's important not to enter the content host until after you've completed the CNAME setup, as this will break Pendo's data collection.
-
Optionally, select one or both of the following settings. This is required if you also plan to customize your mappings. For more information and instructions, see Customize mappings in this article.
-
Disable passing Segment's group id and group traits to Pendo on start up. This allows you to adjust the mapping of the Account ID in Segment's group event. The setting overrides sending Segment's Group ID for Pendo's Account ID, preventing Pendo from initializing with the Group ID from Segment,
analytics.group().id()
. -
Disable passing Segment's user traits to Pendo on start up. This allows you to adjust the mapping of the visitor metadata in Segment's identify event. This settings overrides sending Segment's user traits on load, preventing Pendo from initializing with the user traits from Segment,
analytics.user().traits()
.
-
Disable passing Segment's group id and group traits to Pendo on start up. This allows you to adjust the mapping of the Account ID in Segment's group event. The setting overrides sending Segment's Group ID for Pendo's Account ID, preventing Pendo from initializing with the Group ID from Segment,
- If not already enabled, enable the destination so that it begins receiving data.
By default, Pendo creates data mappings that forward Segment’s Identify, Track, and Group Events to Pendo. For information about these presets, see Twilio Segment integration overview. You can turn off these mappings in Settings > Data Mappings. For more information, see Configure visitor and account metadata.
Alternatively, you can Customize mappings from the Mappings tab in your Pendo Web (Actions) destination in Segment.
Customize mappings
Optionally, if the default mappings aren't suitable for the information you want to send to Pendo, you can customize the mapping for an action in Segment. The only value we don't allow you to change is the Segment User ID to the Pendo Visitor ID.
For example, if you don't intend to match Segment Group IDs with Pendo Account IDs, you can turn off the ability to pass Segment's Group IDs and traits to Pendo as part of Step 2, and then follow the proceeding instructions to update the Send Group Event mapping and choose a different value to send from Segment to the Pendo Account ID, such as a group trait called pendo_account_id.
To update a mapping in Segment, first ensure that the appropriate settings are selected for the Pendo Web (Actions) destination, as defined in Step 2 of this article, then:
- In Segment, go to Destinations and select the Pendo Web (Actions) Destination.
- In the Mappings tab, open the action that you would like to edit. Select the ellipsis (...) at the end of the row and then select Edit Mapping.
- Define how to map the fields from your Source to your Pendo Web (Actions) Destination. You can't edit userID. This has to map onto Visitor ID in Pendo.
- Select Save to continue.
Migrate from the classic Pendo destination
This article provides instructions for setting up the Segment integration using the Pendo Web (Actions) destination, which is different from the classic Pendo destination. For more information, see the Twilio Segment integration overview.
To migrate from the classic Pendo destination to the Pendo Web (Actions) destination, remove the classic Pendo destination from your Segment workspace and then follow Steps 1 and 2 in this article to add Pendo Web (Actions).