Back to Docs

Segment

On This Page

Adding a Segment Integration in Variance

Segment is the easiest way to get your customer data into Variance. Hooking up Segment is easy. To start, head to the Integrations page in Variance.

You'll find integrations under your company name in the top nav

Then you'll Add a Segment Connection. You can describe it in any way you want, but we suggest using the name of the Segment source you're going to be piping from. We recommend you use one connection per source, as you can then filter by source, but it's up to you. As part of the setup you'll also be asked for your Account Mapping preferences. This outlines how you include Account information on your Segment `identify` calls. You can find lots more detail on this in our Account Mapping section.

Name your integration and (only the first time) tell us how you identify the company

Once you've added the integration you'll see two pieces of data:

  1. API Key
  2. Webhook URL
Hooking up Segment is a breeze

Connecting the Variance Destination in Segment

The very best method for connecting Variance up as a Segment destination is to use the official Segment Destinations catalog. Simply follow these steps:

  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for "Variance" in the Destinations Catalog, and select the "Variance" destination.
  3. Choose which Source should send data to the "Variance" destination.
  4. Go to the Variance Integrations page (you'll see it in the main nav under your company name).
  5. Click Add Connection.
  6. Give your connection a name (descriptive is better as it can be used as an event filter in Variance).
  7. Choose a method for account matching. Details on these methods can be found in the Account Mapping section.
  8. Find and copy the "API" and "Webhook URL" fields associated with this project.
  9. Back in the Segment App, enter these as the "API Key" and "Webhook URL" fields in the "Variance" Destination settings.

That's it. You should be good to go.

Account Matching from Segment to Variance

On the first time you connect a Segment integration we ask for a little bit of additional information about how you link users with their companies in your Segment data. You can find the full details of our options on our Account Matching docs page.

If you aren't sure how you do account mapping now, you can check your Segment debugger (we're happy to help as well). If none of these work for you or you have any questions at all, please reach out and we're happy to hop on a Zoom and help you get set up.

Grabbing Your Identify Structure

If you aren't sure what properties you're using for identifying accounts, it's easy to go into the Segment debugger to to find the payload of a recent `identify` call.

  1. Go to your Segment Workspace
  2. Find the Source you want to connect to Variance
  3. Click Debugger in the Source nav
  4. Click Advanced
  5. Uncheck everything except Identify
Finding your identify calls is easy in the Segment Debugger

From there you should see a number of Identify calls. Just click into one (that doesn't say anonymous) and it should look something like this:

analytics.identify('1234567-ABCD-9876', {
  company.name: 'Variance, Inc.',
  company.id: '123-ABC',
  email: 'name@company.com',
  firstName: 'Noah',
  lastName: 'Brier',
  name: 'Noah Brier',
  role: 'OWNER',
});

You'll see within that call that the company is being identified with `company.name` and `company.id`. We will use these to do account matching.

Backfilling Segment Data

If you have been warehousing your Segment data and would like to use it to backfill your Variance account, please reach out. We have tools to make that process simple.

Last Updated: 
March 31, 2022