How to Integrate with Segment

read
Last updated at:

Overview

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 track and 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.

Segment sources and destinations, with Add Destination button on the far right 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.

Search for Klaviyo in Destinations catalog, showing Klaviyo tile on right side of screen

Select and confirm a source from your Segment project. On the next page, enter all of the following:

Treat private API keys like passwords kept in a safe place and never exposed to the public.

Adding this information will replace the need to use Klaviyo's JavaScript tracking API.

Adding Klaviyo API key (required), list ID, and Private key into Segment destination setup, with connection settings shown at bottom of the page

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.

Other settings for Klaviyo destination setup, with the enforce email as primary identifier shown toggled 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.

Selecting website in Segment to find write API key for, with Sources selected from left menu and a test website shown on right

Click on the Settings tab at the top and then select API Keys.

Settings tab selected from top menu and API Keys selected from left menu to copy Segment Write Key for use in Klaviyo

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.

Screenshot of All Klaviyo integrations filtered for Segment in the top text box with the Segment API integration showing on bottom, and the Add Integration button on the far right side of the screen

Then, paste the write key you copied earlier into the box.

Blurred out write key pasted into Segment integration in Klaviyo, with unselected checkbox below and the button Update Segment Settings at the bottom

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.

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 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 identify and 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.

Viewing Segment API metrics, shown in Klaviyo with API gear icon: Ordered Product and Placed Order

Additional Resources

x
Was this article helpful?
17 out of 35 found this helpful