How to integrate with Segment

Last updated at:

You will learn

Learn how to integrate Segment with Klaviyo to be able to trigger and filter flows, and define segments using events synced to Klaviyo from your Segment project. Klaviyo is able to sync any track and identify calls you make from Segment to Klaviyo.

This integration takes two steps: enabling the integration on the Segment side, and enabling the integration on the Klaviyo side. Make sure to also explore Segment's comprehensive guide to integrating with Klaviyo

Before you begin

This integration now supports the two-way flow of information between Segment and Klaviyo, but you will need to select either Klaviyo or Segment as your primary source of truth for profile creation.

If you select Klaviyo as your primary source, note the following: profiles generated in Segment contain a unique ID which Klaviyo keeps track of to record where these profiles came from. Klaviyo cannot easily reconcile duplicate profiles from different sources, so there is a chance of pushing duplicated profiles to Segment. See the Enable Integration in Klaviyo section below for more information.

Connect Segment and Klaviyo

Add Klaviyo destination to Segment

  1. From your Segment project page, click Connections in the left hand navigation bar, then click Add Destination on the right side of the page.
    Connections tab in Segment with Add Destination button with blue background
  2. Search for Klaviyo in the Segment catalog. Once it appears, click on the Klaviyo tile, and then click Configure Klaviyo on the next page.
    Segment catalog with Klaviyo in search bar and Klaviyo card in results
  3. Select and confirm a source from your Segment project. On the next page, enter all of the following:
  4. Finally, scroll down to Other Settings to verify that Enforce Email as Primary Identifier is set to On. It should be toggled on by default. If not, click into the setting and set it to On.
    Klaviyo setup page in Segment Other Settings section with Confirm Optin set to On and Enforce Email as Primary Identifier set to On
  5. To enable the integration on Klaviyo’s side, you’ll first need to get your write key from Segment. In Segment, navigate to Connections > Sources, and click on the site you’d like to connect with Klaviyo.
    List of sources in Connections tab in Segment showing test website in list
  6. Click on the Settings tab at the top and then select API Keys.
    Test website source page in Segment with Settings tab selected, with Source ID and Write Key blurred out
  7. Copy your Write Key. Your write key is another private API key. Treat it like a password; keep it in a safe place and never expose it to the public.

Enable the integration in Klaviyo

  1. In Klaviyo, click your account name in the lower left corner, then select Integrations.
  2. Select All Integrations, search for Segment, and then click Add Integration.
    Integrations tab in Klaviyo with Segment in search bar and Segment card in results
  3. Paste the write key you copied earlier into the box.
    Segment integration settings page in Klaviyo with Write Key blurred out and Update Segment Settings button with blue background
  4. Here is where you also have the ability to limit the data you pass back to Segment, by checking the box next to Do not sync profiles that are not updated by the Klaviyo Destination.
    • As noted in the Overview, this integration now supports the ability to pass information back and forth between Segment and Klaviyo, using a unique ID to keep track of which profiles are originally from Segment. If you have multiple integrations enabled in Klaviyo, there is a possibility that the same customer will interact with you from two separate sources, and as a result, this customer will end up with duplicated profiles in Klaviyo.
    • To help avoid this duplication of profiles across multiple services, you can check the box above, which will limit the profiles Klaviyo syncs with Segment to only the profiles originally created in Segment.
  5. Once you’ve selected the settings you would like to enable, click Update Segment Settings to complete the integration.

Segment metrics

We recommend syncing the most important events to Klaviyo, such as:

  • When a customer signs up
  • When a customer starts to checkout or expresses interest in paying
  • What a customer buys (including pictures of items and descriptions of items)

For each event you send through Segment, a customer is identified by their email address. For detailed information on how to format these events, see the Segment's Klaviyo Integration guide.

For transactional web businesses and ecommerce platforms, we recommend following our guide to integrating a custom ecommerce cart or platform guide for detailed information on the events that should be sent to Klaviyo through Segment.

Monitoring the Klaviyo sync

Once you activate the Klaviyo integration inside of Segment, your identify and track calls will begin sending data to Klaviyo within 5-10 minutes. To verify Segment is sending data to Klaviyo, click the Analytics dropdown in Klaviyo and select the Metrics tab. 

As events are triggered in Segment, they will send data to Klaviyo, where the event name from the Segment track call is used to create the metric name. Klaviyo treats Segment metrics as third-party API metrics, so each metric will have a gear icon next to its name in Klaviyo. To view the data as it flows into Klaviyo, navigate to the Activity Feed for each metric.



You've now integrated Segment with Klaviyo and can start using Segment data to trigger and filter flows, and define segments using events synced to Klaviyo from your Segment project. 

Additional resources

Was this article helpful?
22 out of 47 found this helpful