You can use your PostHog event data to create and update contacts in Klaviyo. Here's everything you need to get started.
Requirements
Using this requires either PostHog Cloud with the data pipelines add-on, or a self-hosted PostHog instance running a recent version of the Docker image.
Configuring Klaviyo
First, create a new API key in your Klaviyo account settings.
Make sure to set Read/Write Access
for:
- Events to send event data
- Profiles to send contact data
Configuring PostHog’s Klaviyo destination
- In PostHog, click the Data pipeline tab in the left sidebar.
- Click the Destinations tab.
- Click New destination and choose a Klaviyo option for either creating/updating contacts or sending events.
Insert your API key. You can also choose a different property to use as the contact's email; PostHog will default to person.properties.email
.
You can additionally forward all person or event properties to Klaviyo, or include specific ones by updating the property map:
Filtering
You should configure the destination filter to only accept events that have an email property set.
Testing
Once you’ve configured your Klaviyo destination, click Create & enable then Start testing to verify everything works the way you want.
Option | Description |
---|---|
Klaviyo Private API Key Type: string Required: True | You can create a Private API Key in the account settings (https://www.klaviyo.com/settings/account/api-keys) |
User Email Type: string Required: True | Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users. |
External ID Type: string Required: True | A unique identifier used to associate Klaviyo profiles with profiles in an external system |
Include all event properties as event attributes Type: boolean Required: True | If set, all event properties will be included as attributes. Individual attributes can be overridden below. |
Attributes Type: dictionary Required: False | Map of event attributes and their values. |
FAQ
Is the source code for this destination available?
PostHog is open-source and so are all the destination on the platform. The source code is available on GitHub.
Who maintains this?
This is maintained by PostHog. If you have issues with it not functioning as intended, please let us know!
What if I have feedback on this destination?
We love feature requests and feedback. Please tell us what you think.
What if my question isn't answered above?
We love answering questions. Ask us anything via our community forum.