> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Klaviyo

> Understand how Molin AI integrates with Klaviyo for tracking customer interactions and triggering automations.

If you use [Klaviyo](https://www.klaviyo.com/) on your website, the Molin AI widget automatically sends custom events to Klaviyo. You can trigger flows, build segments, and analyze engagement from chat interactions. No setup needed.

## How it works

When a visitor interacts with the widget, we call `klaviyo.push(["track", ...])` on the [Klaviyo client-side API](https://developers.klaviyo.com/en/docs/introduction_to_the_klaviyo_object). You see these events as metrics in your Klaviyo account, and you can use them in flows, segments, and reports.

<Note>If you don't have Klaviyo on your website, we skip these calls. You won't see any performance hit or errors.</Note>

## Custom events

We fire events via `klaviyo.push(["track", name])`. They appear as metrics in Klaviyo.

| Event                        | When it fires                                           |
| ---------------------------- | ------------------------------------------------------- |
| `molin_chat_open`            | User opens the chat window                              |
| `molin_chat_close`           | User closes the chat window                             |
| `molin_message_sent`         | User sends a message in the chat                        |
| `molin_link_click`           | User clicks a link inside the chat conversation         |
| `molin_lead_collected`       | The AI collects a lead (visitor name + contact details) |
| `molin_order_lookup`         | The AI finds an order and shows its details             |
| `molin_live_chat_requested`  | The AI escalates the visitor to a human support agent   |
| `molin_product_review_shown` | The AI shows customer product reviews                   |

## Using events in Klaviyo

Once events are flowing, you can:

* **Create flows** triggered by any of these events (e.g. send a follow-up email after a user interacts with the chat).
* **Build segments** based on event activity (e.g. "users who chatted in the last 7 days").
* **Analyze engagement** in Klaviyo's analytics dashboards.

<Note>Klaviyo's client-side tracking only records events for visitors it has already identified (cookied). It doesn't track events for anonymous visitors.</Note>

## Requirements

You must already have Klaviyo's onsite JavaScript (`klaviyo.js`) on your website.
