This article walks through integrating Segment with Klaviyo. Once you integrate, you'll be able to trigger and filter flows, and define segments using events synced to Klaviyo from your Segment project. We will be able to sync any
identify calls you make from Segment to Klaviyo.
Make sure to also explore Segment's comprehensive guide to integrating with Klaviyo.
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
From your Segment project page, click Connections in the left hand navigation bar, then click Add Destination on the right side of the page.
Search for Klaviyo in the Segment catalog. Once it appears, click on the Klaviyo tile, and then click Configure Klaviyo on the next page.
Select and confirm a source from your Segment project. On the next page, enter all of the following:
- Your public Klaviyo API key
- The list ID of the default list you want to sync with
- A private Klaviyo API key
Treat private API keys like passwords kept in a safe place and never exposed to the public.
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.
Enable the Integration in Klaviyo
To enable the integration on Klaviyo’s side, you’ll first need to get your write key from Segment.
Navigate to Connections > Sources, and click on the site you’d like to connect with Klaviyo.
Click on the Settings tab at the top and then select API Keys.
Copy your Write Key and head back over to Klaviyo.
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.
Navigate to the Integrations tab in your Klaviyo account.
Flip to All Integrations, type Segment into the search box at the top of the page, and then click Add Integration.
Then, paste the write key you copied earlier into the box.
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.
Once you’ve selected the settings you would like to enable, click Update Segment Settings to complete the integration.
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 Klaviyo Integration guide.
For transactional web businesses and ecommerce platforms, we recommend following our 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
track calls will begin sending data to Klaviyo within 5-10 minutes. To verify Segment is sending data to Klaviyo, navigate to the Analytics tab in Klaviyo and click into Metrics.
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.