Klaviyo

Email and SMS marketing platform with deep ecommerce integration, behavioural segmentation, and automated flows.

⚠️

This integration is currently in alpha. Configuration and behaviour may change.

Prerequisites

Complete these steps in Klaviyo before configuring Signal.

Access your Klaviyo account

Log in to the Klaviyo dashboard at klaviyo.com. If you do not have an account, sign up for a Klaviyo plan that includes API access.

Find your Public API Key (Site ID)

Navigate to Account > Settings > API Keys. Your Public API Key (also called Company ID or Site ID) is a 6-character alphanumeric string displayed at the top of the page. Copy it.

Create a Private API Key

On the same API Keys page, click Create Private API Key. Configure:

  1. Give it a name (e.g. “Datafly Signal”).
  2. Select the Custom Key scope and grant at minimum:
    • Profiles: Read, Write
    • Events: Write
    • Lists: Read, Write (if you plan to sync subscribers)
  3. Click Create.
  4. Copy the Private API Key immediately — it will not be shown again.
⚠️

Use a Private API Key (server-side), not the Public API Key, for event tracking. Public keys are designed for browser use and lack the necessary write scopes.

Configuration

FieldTypeRequiredDescription
public_api_keystringYesYour Klaviyo public API key (6-char Site ID). Found in Account > Settings > API Keys.
private_api_keysecretYesA Klaviyo private API key with events:write and profiles:write scopes.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find Klaviyo under the Marketing Automation category.
  4. Click Install, and fill in the required fields with the credentials gathered above.
  5. Click Install Integration to create the integration with a ready-to-use default configuration.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/klaviyo/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Klaviyo",
    "variant": "default",
    "config": {
      "public_api_key": "ABC123",
      "private_api_key": "pk_xxxxxxxxxxxxxxxxxxxx"
    },
    "delivery_mode": "server_side"
  }'

Event Mapping

The default Klaviyo blueprint maps:

Datafly EventKlaviyo EventNotes
pagepage_viewURL and page title forwarded as event properties.
Product Viewedproduct_viewedProduct ID, name, and price.
Order CompletedpurchaseOrder ID, revenue, and currency — used for revenue attribution.
Custom eventsDropped by defaultEnable the event in the blueprint editor to forward.

All events are sent to POST https://a.klaviyo.com/api/events/ with Authorization: Klaviyo-API-Key {private_api_key} and revision: 2024-10-15.

Identity

Klaviyo identifies profiles primarily by email, and supports phone and an external ID as additional match keys.

FieldSourceNotes
emailtraits.emailKlaviyo’s primary profile key.
phone_numbertraits.phoneE.164 format. Used for SMS subscribers and as a secondary match key.
external_iduser_id from datafly.identify()Your stable customer ID. Useful for unifying Klaviyo with your own backend.
anonymous_idDatafly anonymous identifierBrowser-scoped identifier so pre-login activity stitches when the user identifies.

Call datafly.identify() whenever a user logs in or submits a form:

datafly.identify("user-123", {
  email: "jane@example.com",
  phone: "+447700900123"
});

Klaviyo events should be sent under the marketing consent category. Klaviyo also manages its own subscription consent records per channel (email, SMS) — Signal forwards the visitor’s CMP consent state on every event so flows can suppress messaging where appropriate.

Verify it’s working

  1. After installing the integration, trigger a test event from your website or via the Signal event API.
  2. In Klaviyo, navigate to Audience > Profiles and search for the test user by email to verify the profile was created.
  3. Click into the profile and check the Activity Feed for the events Signal delivered.
  4. In Signal, check Live Events to confirm delivery with a 202 response status (Klaviyo returns 202 Accepted on success).

Troubleshooting

SymptomPossible CauseResolution
401 UnauthorizedInvalid private API key or missing scopesVerify the private key in Klaviyo Account > Settings > API Keys. Ensure events:write and profiles:write scopes are granted.
400 Bad RequestMissing profile identifierKlaviyo requires at least one of email, phone_number, or external_id on every event.
Events not appearing on profileProfile lookup mismatchKlaviyo creates a new profile if the identifier doesn’t match an existing one. Confirm the email/phone matches the existing profile exactly.
429 Too Many RequestsRate limit exceededKlaviyo applies per-endpoint rate limits. Signal retries on 429 automatically; if persistent, contact Klaviyo support.

Visit Klaviyo API documentation for full reference and event tracking details.

See also

  • Iterable — cross-channel marketing alternative
  • Braze — multi-channel engagement alternative
  • Attentive — SMS-focused alternative