Gainsight Destination

Segment makes it easy to send your data to Gainsight (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Gainsight in the format they understand. Learn more about how to use Gainsight with Segment.

Getting Started

When you toggle on Gainsight in Segment, we’ll start sending data to the Gainsight API for your account. Currently, Gainsight will send data from any one of our libraries.

To start pushing user data to Gainsight, toggle the destination on and add your Access Key. This key can be generated from the integrations page under the “admin” area in Gainsight.

Gainsight currently supports the following methods:


Gainsight needs a way to map Segment data to a Salesforce Account. That can be done via the Segment identify, group, or track methods.

Identify

To map your identify calls to a Salesforce Account, pass the Salesforce Account ID as a trait, like this:

analytics.identify('123', {
  accountId: 'o283h08fh2390f923uofu23',
  name: 'Jake Peterson'
});

This example is for analytics.js. If you’re using a different Segment source check out our sources docs to see how identify calls work for your source.

Inside of Gainsight you’ll need to map the accountId to the Salesforce Account ID and Gainsight will handle the rest and collect any additional info you send in your identify calls and attribute them to the correct Account.

Group

To map your group calls to a Salesforce Account, pass the Salesforce Account ID as the groupId, like this:

analytics.group('555', {
  name: 'Twitter',
  url: 'https://twitter.com'
});

This example is for Analytics.js. If you’re using a different Segment library check out our source docs to see how group calls work for your source.

Track

Important: It is recommended that you only send .track() events that you need. You can whitelist the names of your Segment events in the settings pane for Gainsight. Once you pre-map your events, we will only send those events to Gainsight. However, if you do not map any events, we will by default send all your track events to Gainsight!

Mapping your track calls to a Salesforce Account is only necessary if the user doing the event is not already identified or grouped. If the user is identified all their events will be picked up automatically.

If they haven’t been identified, pass the Salesforce Account ID as a property, like this:

analytics.track('Account Created', {
  accountId: 'o283h08fh2390f923uofu23',
  source: 'Invite',
  title: 'CEO'
});

This example is for Analytics.js. If you’re using a different Segment library check out our source docs to see how group calls work for your source.

Inside of Gainsight you’ll need to map the accountId to the Salesforce Account ID and Gainsight will handle the rest and collect any additional info you send in your track calls and attribute them to the correct Account.


Supported Sources and Connection Modes

WebMobileServer
📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Access Key

It should be 36 characters long, and look something like this: 35a84f9e-7084-47a1-b8a5-593444e9e862.

Whitelist Track Events

Whitelist Segment .track() events you’d like to send to Gainsight. By default, if you do not whitelist any events, we will send all .track() events. If you do whitelist any events, we will only send those events through. Put the name of your .track() events here, ie. ‘Order Completed’


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!