> For the complete documentation index, see [llms.txt](https://docs.anedot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md).

# Klaviyo

Connect Anedot to Klaviyo to send Action Page submissions and recurring donation payments as events, and review field mapping, payload data and troubleshooting.

**Klaviyo** is a marketing automation platform for email and text message (SMS) marketing. The integration sends each Action Page submission and each successful recurring donation payment to Klaviyo as an event tied to the person's email address. You set it up in **Settings > Integrations**, where you can connect Anedot to Klaviyo, manage your connection, and review how data relays work, where to find your data, field mapping, payload data and troubleshooting.

## Before You Begin

* You need **Integrations: Edit permissions** to add, edit, push or delete a connection. Integrations: Edit permissions also require **Action Pages: View permissions** and **Integrations: View permissions**. See [Permission Sets](https://docs.anedot.com/settings/access/permission-sets.md).
* You need a Klaviyo account.
* You need access in Klaviyo to create a private API key. See [Step 1: Create a Klaviyo Private API Key](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#step-1-create-a-klaviyo-private-api-key).
* The only setup field in Anedot is **Klaviyo API key**, and it's required. There's no list setting, so Anedot doesn't add people to Klaviyo lists or send subscription requests.

## Connect Anedot to Klaviyo

### Step 1: Create a Klaviyo Private API Key

You create the private API key in your Klaviyo account, not in Anedot.

To create a private API key:

1. In Klaviyo, click your organization name in the bottom left.
2. Go to **Settings**.
3. Click **API keys**.
4. Click **Create Private API Key**.
5. Enter a name for the key.
6. Under **Select Access Level**, keep **Custom Key** selected.
7. Under **API Scopes**, choose **Read/Write Access** for the Events scope. Anedot only creates events, which needs `events:write`.
8. Leave every other scope set to **No Access**.
9. Click **Create**.
10. On the confirmation page, use **Copy Key** or **Download (.txt)** to save the key in a secure place, such as a password manager.
11. Click **Close**.

Your private API key is ready to enter in Anedot.

{% hint style="warning" %}
Klaviyo shows the full private API key only on the confirmation page, and you can't add or edit a key's scopes after you create it. If you need a different key or different scopes, create a new key, connect Anedot again with it, and delete the old key in Klaviyo only after the new connection works.
{% endhint %}

{% hint style="info" %}
Private API keys start with `pk_`. Your public API key, also called your site ID, is for website code and can't be used here.
{% endhint %}

### Step 2: Create the Connection in Anedot

To create the connection:

1. Go to **Settings > Integrations**.
2. Click **New integration**.
3. Choose **Klaviyo**, or enter "Klaviyo" in the search box.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Klaviyo</strong> appears under the <strong>Email Marketing</strong> category with the text "Send Action Page data to Klaviyo."</p></div>
4. Choose the Action Page scope:
   * Keep **All Action Pages** checked to include every Action Page, including pages you add later. (Optional) In **Exclude Pages**, enter a comma-separated list of Action Page IDs with no spaces.
   * Uncheck **All Action Pages** and choose **Selected pages** to pick specific pages.
5. (Optional) In **Team**, choose a Team to limit the connection to that Team's Action Pages. Leave it set to **All teams** to include every Team. See [Teams](https://docs.anedot.com/settings/access/teams.md).
6. Enter your Klaviyo private API key in **Klaviyo API key**.
7. Click **Create integration**.

The connection is listed in **Settings > Integrations**.

{% hint style="success" %}
After you connect, submit a test on a covered Action Page with an email address and check **Settings > Integrations > Integration Requests** for a **Success** row.
{% endhint %}

## Manage Your Connection

### Edit Your Connection

You can change the Action Page scope, **Team**, **Name** and **Enabled** on an existing connection.

To edit your connection:

1. Go to **Settings > Integrations**.
2. Click **Edit** on the Klaviyo connection.
3. Update the Action Page scope, **Team**, **Name** or **Enabled**.
4. Click **Save integration**.

New settings apply to records sent from then on. Editing doesn't resend records already sent, and unchecking **Enabled** stops sending.

{% hint style="info" %}
The Edit form also shows a **Credentials/details JSON** box. Leave it as it is.
{% endhint %}

The API key isn't shown or changed in the Edit form. To use a different API key, delete the connection and connect again with the new key. See [Reconnect Or Delete Your Connection](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#reconnect-or-delete-your-connection).

### Push Unsent Records

**Push unsent** resends failed or never-sent submissions and recurring donation payments for a date range.

* The range can be up to 31 days.
* The start date must be within the last 12 months.
* Wait about five minutes between pushes.
* Only failed or unsent records are sent. Successful ones aren't sent again.

For full steps, see [Push Unsent in Webhooks (API)](https://docs.anedot.com/integrations/integration-automation-tools/webhooks.md#push-unsent).

### Reconnect Or Delete Your Connection

To delete your connection:

1. Go to **Settings > Integrations**.
2. Click **Delete** on the Klaviyo connection.
3. Confirm the prompt "Delete this integration?".

Anedot stops sending to Klaviyo. Profiles and events already in Klaviyo aren't changed.

To reconnect, follow the steps in [Connect Anedot to Klaviyo](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#connect-anedot-to-klaviyo) again.

{% hint style="info" %}
Records already sent successfully with the same API key aren't sent again after you reconnect with that key.
{% endhint %}

## Data Relays

### What Anedot Sends

Anedot sends one event per Action Page submission in the connection's scope, and one event per successful recurring donation payment from a commitment on a covered Action Page.

* Donation Pages, Event Pages and Lead Pages are all sent.
* Lead Page submissions are sent when they're submitted. Donation Page submissions are sent once the donation is completed.
* Each event includes the person's email address and the values in [Field Mapping](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#field-mapping). Blank values are sent empty.
* Custom field and hidden field answers from the Action Page aren't sent to Klaviyo. Tracking values reach Klaviyo through the source code and UTM codes.
* Failed recurring payments, commitment changes (such as a cancellation), refunds, and donation status changes aren't sent. See [Commitments](https://docs.anedot.com/finance/management-and-reporting/commitments.md).
* Anedot sends each record's ID as the event's unique ID.

Klaviyo uses the email address to identify the person, and creates a new profile or updates the existing one. If the same unique ID is sent again for the same profile and metric, Klaviyo records only the first event.

### Records Anedot Skips

Anedot doesn't send these records, and they don't show a row in **Settings > Integrations > Integration Requests**:

* A submission or recurring payment with no email address.
* A record that was already sent successfully to a Klaviyo connection with the same API key, including a connection you deleted and connected again.
* A Donation Page submission whose donation isn't completed yet. It's sent when it completes.
* A recurring payment that didn't succeed.
* Any record while **Enabled** is unchecked.

### Delivery And Retries

Each record sent shows a row in **Settings > Integrations > Integration Requests** with its status (**Success**, **Failure** or **Error**), the request and the response. The stored request doesn't include your API key. See [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md).

* **Success**: Klaviyo accepted the event.
* **Failure**: Klaviyo rejected the event, and Anedot doesn't try that record again. Fix the cause, then use [Push Unsent Records](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#push-unsent-records).
* **Error**: Anedot couldn't reach Klaviyo and tries again automatically.

A **Success** row means Klaviyo accepted the event for processing. It doesn't guarantee processing is complete, so a new event can take a moment to appear in Klaviyo.

Users with the **Integration sync failed** notification turned on get an email when a row shows **Failure**. See [Notifications](https://docs.anedot.com/get-started/security/notifications.md).

{% hint style="warning" %}
Repeated authorization errors, where Klaviyo rejects the API key, turn the connection off. A successful send resets this. If the connection stops sending, delete it and connect again with a working API key.
{% endhint %}

## Find Your Data in Klaviyo

To find a person's profile:

1. In Klaviyo, go to **Audience > Profiles**.
2. In the **Search** field above the profiles table, enter the person's email address, then press Enter.
3. Click the profile in the search results.
4. Review the activity log on the right side of the page.
5. (Optional) To show only Anedot events, choose up to 5 Anedot metrics from the activity log's drop-down.

The person's Anedot events show in the activity log.

To find events by metric:

1. In Klaviyo, go to **Analytics > Metrics**.
2. Search for the metric, for example "Anedot: Submission Created", in **Search metrics**, then click its name.
3. Click the **Activity feed** tab.
4. (Optional) To see the values Anedot sent with an event, click the 3-dot menu on the event's row and click **Activity details**.

The events Anedot sent for that metric show in the activity feed.

## Field Mapping

| Anedot Value                                                                        | Klaviyo Key      | Sent In          |
| ----------------------------------------------------------------------------------- | ---------------- | ---------------- |
| Email                                                                               | `email`          | Profile          |
| First name                                                                          | `first_name`     | Profile          |
| Last name                                                                           | `last_name`      | Profile          |
| Phone                                                                               | `phone_number`   | Profile          |
| City                                                                                | `city`           | Profile          |
| State or region                                                                     | `region`         | Profile          |
| Country, such as US                                                                 | `country`        | Profile          |
| ZIP code                                                                            | `zip`            | Profile          |
| Action Page submissions: the exact value "Anedot: Submission Created"               | Metric `name`    | Metric           |
| Successful recurring donation payments: the exact value "Anedot: Recurring Created" | Metric `name`    | Metric           |
| Your Anedot account's display name                                                  | `Anedot Account` | Event properties |
| Source code                                                                         | `Source Code`    | Event properties |
| UTM campaign                                                                        | `utm_campaign`   | Event properties |
| UTM content                                                                         | `utm_content`    | Event properties |
| UTM medium                                                                          | `utm_medium`     | Event properties |
| UTM source                                                                          | `utm_source`     | Event properties |
| UTM term                                                                            | `utm_term`       | Event properties |
| Submission ID, or the recurring payment's ID                                        | `unique_id`      | Event            |
| Total amount in dollars, such as 100.0 (0.0 when there's no payment)                | `value`          | Event            |
| Date and time the record was created, in UTC                                        | `time`           | Event            |

* **`Source Code`**: The source code in the page link (`source_code`, `sc` or `refcd`), or the page's **Default Source Code** when the link has none. Recurring payments send the source code from the original submission. Set a default in [Page Settings: SEO, Sharing, and Tracking](https://docs.anedot.com/action-pages/page-builder/page-settings-seo-sharing-and-tracking.md). See [URL Parameters](https://docs.anedot.com/action-pages/advanced-features/url-parameter.md).
* **`utm_campaign`, `utm_content`, `utm_medium`, `utm_source`, `utm_term`**: Filled only when the page link includes `utm_campaign`, `utm_content`, `utm_medium`, `utm_source` or `utm_term`. Otherwise they're sent empty. Recurring payments send the UTM codes from the original submission. See [URL Parameters](https://docs.anedot.com/action-pages/advanced-features/url-parameter.md).
* **`Anedot Account`**: Filled from your account with no setup.
* **Hidden fields**: Hidden field values aren't sent to Klaviyo. To track a source in Klaviyo, use a source code or UTM codes in the page link instead. See [Hidden Fields](https://docs.anedot.com/action-pages/page-builder/hidden-fields.md).

## Payload Data

These are the request and response bodies shown in **Settings > Integrations > Integration Requests**.

### Request Body

```json
{
  "type": "event",
  "attributes": {
    "profile": {
      "email": "annie@anedot.com",
      "first_name": "Annie",
      "last_name": "Dot",
      "phone_number": "2015550123",
      "city": "New Orleans",
      "region": "LA",
      "country": "US",
      "zip": "70113"
    },
    "metric": {
      "name": "Anedot: Submission Created"
    },
    "properties": {
      "Anedot Account": "The Charitable Foundation",
      "Source Code": "2026",
      "utm_campaign": null,
      "utm_content": "gala",
      "utm_medium": "web",
      "utm_source": null,
      "utm_term": null
    },
    "unique_id": "e1c0b789-81c5-489c-959f-e30ca6fa4c9a",
    "value": 100.0,
    "time": "2026-11-10T15:15:27.466Z"
  }
}
```

### Success Response (Status 202)

Klaviyo answers with status 202 when it accepts the event.

### Failure Response (Status 401)

A 401 response means Klaviyo didn't accept the API key.

```json
{
  "errors": [
    {
      "id": "df5497da-4e89-4f5a-a019-3f5d1d772015",
      "code": "not_authenticated",
      "title": "Authentication credentials were not provided.",
      "detail": "Missing or invalid private key.",
      "source": {
        "pointer": "/data/"
      },
      "status": 401
    }
  ]
}
```

## Troubleshooting

### No Row in Integration Requests

Check each of these:

* The Action Page is in the connection's scope, and in its Team if one is set.
* **Enabled** is checked.
* The record has an email address.
* The donation is completed.
* The record wasn't already sent to a Klaviyo connection with the same API key.

See [Records Anedot Skips](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#records-anedot-skips).

### Rows Show Failure

Open the row in **Settings > Integrations > Integration Requests** and read Klaviyo's response. A 401 means Klaviyo didn't accept the API key. Check that you entered a private API key that still exists in Klaviyo, and that the key's Events scope is set to **Read/Write Access**.

Fix the cause, then use [Push Unsent Records](https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md#push-unsent-records). If you need a new key, delete the connection and connect again with the new key first.

### Event Doesn't Show in Klaviyo Yet

Check for a **Success** row in **Settings > Integrations > Integration Requests** first. Klaviyo can take a moment to finish processing an accepted event. Search for the person's email address in **Audience > Profiles**.

### Connection Stopped Sending

Check that **Enabled** is checked on the connection. If the Klaviyo API key was deleted, delete the connection and connect again with a new private API key.

If the issue continues, contact our Support team at <help@anedot.com>.

## Related Articles

* [Integrations](https://docs.anedot.com/integrations.md)
* [Integration Requests](https://docs.anedot.com/integrations/relay-data-troubleshooting/integration-requests.md)
* [URL Parameters](https://docs.anedot.com/action-pages/advanced-features/url-parameter.md)
* [Teams](https://docs.anedot.com/settings/access/teams.md)
* [Notifications](https://docs.anedot.com/get-started/security/notifications.md)
* [Commitments](https://docs.anedot.com/finance/management-and-reporting/commitments.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.anedot.com/integrations/email-marketing-communication/klaviyo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
