Linking Klaviyo as a source
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Contents
The Klaviyo connector syncs your marketing data – campaigns, profiles, events, flows, lists, and metrics – into PostHog, so you can analyze your email and marketing activity alongside your product data.
Prerequisites
You need a Klaviyo account and a private API key. Create one in your Klaviyo account settings by clicking Create Private API Key, giving it a name, and selecting a Read-Only Key. Grant read permissions for the data you want to sync: Accounts, Campaigns, Catalogs, Coupon codes, Coupons, Custom objects, Events, Flows, Forms, Images, Lists, Metrics, Profiles, Push tokens, Reviews, Segments, Tags, Templates, Web feeds, and Webhooks. Tables you haven't granted access to are skipped.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
When linking Klaviyo, you'll need:
- API key – the private API key you created in your Klaviyo account settings (starts with
pk_).
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
The events table is append-only, since Klaviyo events are immutable. On the initial sync, only the last 365 days of events are imported.
List profiles
The opt-in list_profiles table maps which profiles belong to which list as {list_id, profile_id, joined_group_at} rows. This is disabled by default, but can be toggled on in the schema configuration when setting up or editing your Klaviyo source. It supports incremental sync on joined_group_at (the datetime when the profile most recently joined the list). Incremental syncs only pick up new joins and re-joins, and will not account for profiles removed from a list. A full refresh is required if profiles need to be removed. Once synced, you can join it with your profiles table:
Note: List membership isn't the same as subscription. A profile can belong to a list without being subscribed to any of its communications. To check what a profile is actually subscribed to, look at the
$consentarray in the profile'spropertiescolumn — it lists the channels (sms,push) the profile currently consents to. Avoid relying on$consent_timestampfor this: it records when consent was given, but Klaviyo doesn't always clear it when a profile unsubscribes.
To find profiles that are on a list and actually subscribed to a given channel, filter on $consent too:
Webhooks
The webhooks table is only available to Klaviyo accounts with the Advanced KDP add-on. Without it, Klaviyo returns a 403 permission_denied error saying "You must have Advanced KDP enabled to use this endpoint," even when your API key has the Webhooks read scope. This table is disabled by default. Only enable it if your Klaviyo account includes Advanced KDP.
Configuration
| Option | Type | Required |
|---|---|---|
API key | password | Yes |
Conversion metric ID (optional) | text | No |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
email_campaigns | An email marketing campaign in Klaviyo sent to a target audience. | Incremental, Full refresh | updated_at, created_at | — |
sms_campaigns | An SMS marketing campaign in Klaviyo sent to a target audience. | Incremental, Full refresh | updated_at, created_at | — |
events | Only syncs the last 365 days on initial sync | Append only, Full refresh | datetime | — |
flows | An automated flow in Klaviyo that sends messages based on triggers and conditions. | Incremental, Full refresh | updated, created | — |
lists | A list of profiles in Klaviyo used to target campaigns and flows. | Incremental, Full refresh | updated, created | — |
metrics | A metric in Klaviyo that defines a type of tracked event (e.g. Placed Order, Opened Email). | Incremental, Full refresh | — | — |
profiles | Includes each profile's subscriptions object by default: consent status per channel (email, sms, push), global email suppressions in subscriptions.email.marketing.suppression, and per-list email suppressions in subscriptions.email.marketing.list_suppressions | Incremental, Full refresh | updated, created |