How to integrate with Segment

Estimated 5 minute read
|
Updated Nov 27, 2024, 9:55 PM EST
You will learn

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

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

Connect Segment and Klaviyo

Add Klaviyo destination to Segment

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

Enable the integration in Klaviyo

  1. In Klaviyo, click your account name in the lower left corner, then select Integrations.
  2. Select Add integrations, search for Segment, and then click the card. Then, click Install.
  3. Paste the write key you copied earlier into the box, then click Connect to Segment.
  4. On the next page, you'll 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 finished, click Complete setup.
Segment metrics

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

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.

segment9.jpg

Outcome

Outcome

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

Additional resources

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Live training
Join a live session with Klaviyo experts to learn about best practices, how to set up key features, and more.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type