# Klaviyo Integration

## What you can do with Klaviyo

Use a **Klaviyo segment** (like VIP customers) to control **who sees a specific Test or Personalization** in Intelligems.

### How it Works

1. When a visitor is cookied by Klaviyo we use that cookie (`_kx`) to “ask” Klaviyo: “Which segments is this visitor
2. If Klaviyo is able to identify the visitor (i.e. they completed a signup flow, clicked through an email/sms, returned to a site from a browser they previously made a purchase, etc.) then so is Intelligems.

{% hint style="info" %}
If we're unable to identify the visitor, they will be shown the control / not enter the experience.
{% endhint %}

### Common Use Cases

* **Past purchasers** (e.g., a Klaviyo "Customers" segment) — this is the recommended way to run customer-only tests, since Intelligems does not natively have access to Shopify purchase history
* **VIP** and **Loyalty** customers
* **Email subscribers** or segment-specific cohorts (e.g., cart abandoners, active shoppers)

### Why This is Better Targeting Than Using UTMs

1. **Does not require clickthrough** - They do *not* have to click through a Klaviyo email in order for this targeting to work, it’s based on their cookies (which could have been previously set).
2. **Cross-device segment targeting** - If the visitor later opens up a Klaviyo email on a *different* device and/or visits the website and logs in, we will now have the ability to target the new browser/device (cookie) and can serve up cross-device experiences. Each device receives a new `igId`, but experiences remain consistent through Klaviyo segment membership, not a shared ID.

### Prerequisites

* Intelligems is installed on your store
* Klaviyo is installed and set up. [Install here](https://app.intelligems.io/integrations).
* You have at least one **Klaviyo segment** (e.g. “VIP”)<br>

### Step 1: Connect Klaviyo to Intelligems

1. In Intelligems, on the left navigation, click on **Integrations**
2. Find **Klaviyo** under Analytics
3. Click **Sign in with Klaviyo**
4. Log in if prompted
5. Approve permissions (profiles + segments)
6. Confirm Klaviyo shows as **Active** in the Intelligems integrations page.

### Step 2: Confirm Your Segment in Klaviyo

1. Open Klaviyo
2. Go to **Lists & Segments**
3. Confirm the **Segment** you want to target (e.g. **VIP**) exists

{% hint style="info" %}
We can only identify visitors in **Segments.**\
We *cannot* identify visitors in Lists or using Profile Tags.
{% endhint %}

4. *Optional* Send yourself an email so your profile is tagged with that Segment

{% hint style="success" %}
We recommend you star/favorite **Segments** inside of Klaviyo that are active in a Test or Personalization
{% endhint %}

### Step 3: Apply the Segment to a Test or Personalization

1. Create a **Test** or **Personalization** in Intelligems
2. Go to the **Targeting** tab
3. Select **Custom**
4. In the **Targeting type** dropdown, select **Klaviyo Segment**

<figure><img src="/files/mY3scte4jUXQvZWavCHU" alt=""><figcaption></figcaption></figure>

5. Add a condition **Klaviyo segment equals `VIP`**

{% hint style="info" %}
To add multiple Segments, use the +Or Condition and +AND Condition option
{% endhint %}

6. Click **Save**

{% hint style="warning" %}
For Tests, use **Advanced**, not Custom Targeting, if you want to avoid default assignment.\
Otherwise, users may get a default variation first and never switch when the segment is detected.
{% endhint %}

### Step 4: Verify It’s Working

1. Open the Klaviyo email you sent
2. Click the link to your store
3. Watch the URL — you should see a Klaviyo cookie parameter
4. The page may load the default first, then update
5. Confirm the correct experience appears (e.g. your personalized discount appears)

### Result

Users in the targeted Klaviyo segment see the intended Intelligems variation automatically 🎯

### FAQs

<details>

<summary><strong>Does Intelligems receive customer profile data from Klaviyo?</strong></summary>

No. Only segment membership is resolved via exchange ID.

</details>

<details>

<summary><strong>Is segment membership evaluated in real time?</strong></summary>

Segment membership is resolved on visit and cached for up to 1 hour.

</details>

<details>

<summary><strong>Does this work across devices?</strong></summary>

Yes, if the visitor clicks a Klaviyo link on each device or logs into that store. Each visitor receives a new `igId` on each device, but experiences remain consistent because targeting is based on Klaviyo segment membership, not a shared ID. If Klaviyo is able to identify the visitor, then so is Intelligems.

</details>

<details>

<summary><strong>Does this work with Klaviyo lists?</strong></summary>

No, this is only for Segments.

</details>

<details>

<summary><strong>Does this read Klaviyo profile tags?</strong></summary>

No, this is only for Segments.

</details>

### Additional questions about the Klaviyo Integration?

[See Klaviyo API documentation](https://developers.klaviyo.com/en/reference/segments_api_overview) or [email us](https://portal.usepylon.com/intelligems/forms/intelligems-support-request).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.intelligems.io/integrations/klaviyo-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
