Segment.com Integration Overview

This article explains how Pendo integrates with Segment, a platform that collects, stores, and routes your user data.

If you're looking for information related to segmenting your Visitors and Accounts in Pendo, read the article on Segments.

Overview

Segment makes it easy to send your data to Pendo and other integrated tools. Once you’ve tracked your data through Segment’s open source libraries, they’ll translate and route your data to Pendo in the correct format. This article describes setting up Pendo as a Destination in Segment.

 

How it works

When Segment’s snippet is installed on your site, it will automatically initialize Pendo with your API key. You do not have to paste the Pendo installation snippet into Segment, the integration is already configured to send data to Pendo if you enable it.

This replaces the standard Pendo installation method outlined installation article.

 

How to Setup

Pendo supports the identifygroup, and track specs. Follow the setup instructions based on what specs you would like to use:

Note: You will need to add your Pendo API key in the Segment configuration. To find your Pendo API key, log into the Pendo application and navigate to Site Settings (Settings wheel in bottom left hand corner of Pendo Nav Bar) > Hover over monitor icon (if you have multiple apps, make sure to hover over the monitor icon of the app in question) and click "View App Details" > Install Settings. Your API key will be in the sample snippet. 

Identify & Group

From the Segment Destinations page, click on Pendo and include your Pendo API key.

Track & Server Side Data

Pendo track method supports server-side data. If you would like to use server-side data with track or any spec, add both Pendo and Webhook destinations within Segment:

From the Segment Destinations page, search and choose “Webhooks” as your new Destination and Javascript as your Source. Finish configuration using this webhook URL:

US: https://data.pendo.io/data/segmentio/YOUR_PENDO_API_KEY

EU: https://data.eu.pendo.io/data/segmentio/YOUR_PENDO_API_KEY

Replace YOUR_PENDO_API_KEY with your actual Pendo API Key.

Headers are not required in webhook configuration. Once you’re done adding in your URL, save changes.

After your Segment Destination setup is completed, Segment will automatically initialize Pendo using the API key on Analytics.js load. This pulls in all page and click events without needing to make additional method calls.

Identify

The identify spec lets you tie a user to their actions and record traits about them. When you identify a user, Segment will pass that user’s information to Pendo with userId as Pendo’s Visitor ID. User traits are mapped to Visitor metadata in Pendo.

Note: You will need to add the groupId under traits to have Pendo associate Account IDs with users. Not including the groupId will create an empty account in Pendo. Also, adding the groupId here will not create any account metadata. See Group below for associating account metadata.

Read more on Segment's Identify spec.

Group

The group spec allows you associate an individual user with a ‘group’ of users. Pendo associates a ‘group’ with an account. When you call group, Segment will send groupId as the Account ID to Pendo. Group traits are mapped to Account metadata in Pendo. Therefore, group calls (fields groupID & traits) are required if you use Pendo Account data.

Read more on Segment’s Group spec.

Track

The track spec is how you record any actions your users perform, along with any properties that describe the action. When you call track, we will send it as a Pendo Track Event.

To use track events with the Segment integration, add both Pendo and Webhook destinations within Segment:

From the Segment Destinations page, search and choose “Webhooks” as your new Destination and javascript as your Source. Finish configuration using this webhook URL:

US: https://data.pendo.io/data/segmentio/YOUR_PENDO_API_KEY

EU: https://data.eu.pendo.io/data/segmentio/YOUR_PENDO_API_KEY

Replace YOUR_PENDO_API_KEY with your actual Pendo API Key.

Headers are not required in webhook configuration. Once you’re done adding in your URL, save changes. For more information on Pendo’s Track Events, check out the Track Event Help Article.

Mobile

Our Segment integration was originally designed with our Web Agent in mind. However, we can receive Mobile events coming from Segment as Track events through the server-side webhook. We do not currently support the 'Screen' call from Segment.

Pendo as a Segment Source

Everything outlined in this article discusses setting up Pendo as a Destination in Segment. In order to learn more about how to set up Pendo as a Source into Segment, refer to the article on Webhooks.