DocsMeasure
Klaviyo connector
Connect Klaviyo with a private API key. Email and text activity joins each customer, and sources, value, best send hour and segments go back.
On this page
The Klaviyo connector works in two directions:
- In: email and text sends, opens, clicks and unsubscribes join each customer profile.
- Out: Datacenter writes each customer's first and last source, lifetime value, orders and best send hour onto their Klaviyo profile. Segments you pick become Klaviyo lists.
It is on paid plans: Solo, Studio, Agency and Custom. Free does not include it.
Connect with Klaviyo (when shipped). A one-click login: click Connect, log in to Klaviyo in the new tab and allow access, and you are done, with no key to paste. Until it is switched on, use the steps below.
Connect
- In Datacenter, open your site, then Settings, then Integrations. Under Email and texts, click Connect next to Klaviyo.
- In Klaviyo, click your account name, then Settings, then API keys. Click Create Private API Key.
- Name it
Datacenterand pick Custom Key. Set these, and leave everything else at No Access:
| Scope | Access | Why | |---|---|---| | Events | Read | Sends, opens, clicks and unsubscribes | | Metrics | Read | To find those events in your account | | Profiles | Full | To read who each event is about, and to write the Datacenter properties | | Lists | Full | To keep segment lists up to date |
- Click Create. Copy the key. It starts with
pk_. - Paste it into Datacenter and click Connect Klaviyo.
Datacenter checks that the key can read Events, Metrics and Profiles. Klaviyo has no way to check a write scope without writing, so a missing Profiles or Lists write scope shows up on the first send back, with the scope to fix.
Klaviyo does not let you change a key's scopes later. To fix one, make a new key and paste it under Paste a new key.
The key is stored encrypted. It is never shown again, and it never appears in logs.
What comes in
Datacenter reads these Klaviyo events:
| Klaviyo event | On the customer |
|---|---|
| Received Email | Email sent |
| Opened Email | Email opened |
| Clicked Email | Email clicked, with the link (without its query string) |
| Unsubscribed from Email Marketing | Unsubscribed from email |
| Received SMS | Text sent |
| Clicked SMS | Text clicked |
Each item shows the email subject or campaign name.
- The first import reads the last 90 days. A busy account can take a few hours, since each run reads a batch.
- After that, Datacenter checks every 15 minutes, and reads one day back each time, so late events are not missed. Each event is stored once.
Who the customer is
Datacenter finds the customer by the Klaviyo profile id, and by the profile's email and phone (hashed with SHA-256, as everywhere in Datacenter).
- A click or an unsubscribe can add a new customer.
- A send or an open only joins a customer Datacenter already knows. Sends are many, and most mail apps open some mail on their own, so on their own they say little.
If the profile has a time zone, Datacenter keeps it for the best send time.
What goes back
For people Klaviyo already has, Datacenter keeps these profile properties up to date:
| Property | What it holds |
|---|---|
datacenter_first_source | Where they first came from, like instagram |
datacenter_last_source | Where they came from last |
datacenter_ltv | Lifetime value |
datacenter_orders | Number of orders |
datacenter_best_send_hour | Their best hour to get a message, 0 to 23, in their time zone |
datacenter_timezone | The time zone that hour is in |
Use them in Klaviyo segments and flows. For example, a flow can wait until datacenter_best_send_hour, or a segment can pick people whose datacenter_first_source is tiktok.
- Datacenter only updates people who came from Klaviyo. It never adds new profiles and never changes consent.
- A profile is sent again only when one of its values changed.
- To stop, click Stop sending back on the connector's page.
Segments as lists
Each segment you send to Klaviyo becomes a static list named Datacenter: and the segment's name. Datacenter adds people who match and removes people who stop matching, every 15 minutes.
Klaviyo's own segments are built from rules inside Klaviyo, so another tool cannot add people to them. That is why Datacenter uses a list. Build a Klaviyo segment on top of the list if you like.
Renaming a segment in Datacenter does not rename the list. If you delete the list in Klaviyo, Datacenter makes it again.
Sync log
The connector's page lists the last 50 runs: what was added, profiles updated and segment changes, and any errors. Keys and personal data are never shown there.
If something goes wrong
- Klaviyo did not accept the key. It was deleted. Make a new private key and paste it.
- The key cannot read Events (or another scope). Make a new key with that scope set as in the table above.
- Klaviyo is busy right now. Nothing to do. Datacenter tries again every 15 minutes. This shows only after 6 hours with nothing read; a shorter outage is in the sync log alone.
- Paused. Connectors are on paid plans. The plan changed to Free.
Disconnect
Click Disconnect on the connector's page. The key is deleted at once. Items already imported stay on your customers, and the properties and lists stay in Klaviyo. Delete the key in Klaviyo too.
Something missing or wrong? Email hello@datacenter.so.