# Klaviyo storefront events

> The nine Luxe storefront events Klaviyo receives through its onsite tracking: when each fires, their properties, consent and the extra details sent.

Source: https://www.luxesets.com/docs/klaviyo

> **For developers and agencies.** Merchants turn these events on in the app with no code: see the help article [Luxe
> and Klaviyo](https://www.luxesets.com/help/klaviyo). This page is the reference for their names and properties.

## How they are sent

With **Settings > Data and integrations > Klaviyo > Send storefront events** on (off by default, on every Luxe plan), the Luxe app embed loads a small script (`luxe-klaviyo.js`) after the page has loaded, and only when Klaviyo's onsite object (`window.klaviyo`, or the older `_learnq`) is on the page, which **Klaviyo's app embed** provides. Each event goes through Klaviyo's own onsite script (`klaviyo.track`): Luxe makes no request of its own and adds no identifier, so Klaviyo attaches the event to the browser it already identified.

Each event hooks a moment the storefront already reports, so nothing in the Bundle set builder, the tray or the drawer changes. Nothing happens, and nothing breaks, with the Luxe embed off, JavaScript blocked, or Klaviyo absent or failing; nothing is retried. Headless and Tapcart storefronts do not send these events.

## Consent

Each event waits for Shopify's Customer Privacy API and is sent only if `marketingAllowed()` is true. An event from before the shopper's choice is dropped, never sent later. **Reward Unlocked** also needs analytics consent, since Luxe follows the ladder's progress only with it. Klaviyo applies its own rules on top.

## The events

Metric names are Klaviyo's style (Title Case, past tense); each has its own checkbox in Luxe.

| Metric               | Fires                                                          | Repeats                           | On by default |
| -------------------- | -------------------------------------------------------------- | --------------------------------- | ------------- |
| **Viewed Set**       | The Bundle set builder or a Collection set's tray renders      | Once per set per page view        | No            |
| **Started Set**      | The first pick of a set                                        | Once per set per page view        | No            |
| **Built Set**        | Every slot of a set filled, or a Collection set at its minimum | Once per set per page view        | Yes           |
| **Added Set to Bag** | A set added to the bag                                         | Each time                         | Yes           |
| **Edited Set**       | An edited set put back in the bag from the builder or the tray | Each time                         | No            |
| **Shared Set**       | The set's share link copied                                    | Each time                         | No            |
| **Reward Unlocked**  | A rung of a rewards ladder reached in the bag                  | Once per rung per browser session | Yes           |
| **Gift Chosen**      | A reward gift chosen                                           | Each time                         | Yes           |
| **Upsell Accepted**  | Products added from an upsell offer or the checkout offer      | Each time                         | Yes           |

## Properties

Properties are snake_case. Money is a decimal number in the currency named beside it.

### Set events

Viewed Set, Started Set, Built Set, Added Set to Bag, Edited Set and Shared Set carry the set, read from the builder or tray on the page:

| Property           | Type             | Meaning                                                                                                                                                             |
| ------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `set_id`           | string           | The set's id                                                                                                                                                        |
| `set_name`         | string           | The set's name                                                                                                                                                      |
| `set_type`         | string           | `build_your_own`, `collection` or `fixed`                                                                                                                           |
| `set_url`          | string           | The set's page                                                                                                                                                      |
| `image_url`        | string           | The first item image                                                                                                                                                |
| `items`            | array            | At most 30: `variant_id`, `quantity`, and when the page knows the item `product_id`, `name`, `price` (unit price), `image_url` and, for Collection set items, `url` |
| `item_names`       | array of strings | The items' names                                                                                                                                                    |
| `item_count`       | number           | Units in the set                                                                                                                                                    |
| `set_price`        | number           | Luxe's predicted set price; absent while the set has none                                                                                                           |
| `compare_at_price` | number           | The items' own prices added up, when higher than `set_price`                                                                                                        |
| `currency`         | string           | The shopper's currency                                                                                                                                              |
| `on_subscription`  | boolean          | Added Set to Bag and Edited Set: the set was bought on a subscription plan                                                                                          |

| Event            | Also carries                                                |
| ---------------- | ----------------------------------------------------------- |
| Started Set      | `first_item`: the variant id of the first pick              |
| Added Set to Bag | `source` (`builder`, `tray` or `share_link`) and `cart_url` |
| Shared Set       | `share_url`: the link the shopper copied                    |

### Reward, gift and upsell events

| Event                        | Property                   | Meaning                                                                                                                                                     |
| ---------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Reward Unlocked, Gift Chosen | `ladder_id`, `rung_id`     | The ladder and the rung                                                                                                                                     |
|                              | `reward_name`              | The rung's label                                                                                                                                            |
|                              | `reward_type`              | The rung's reward type in lower case, such as `gift` or `free_shipping`                                                                                     |
|                              | `threshold` and `currency` | A subtotal rung's threshold, in the shop currency                                                                                                           |
|                              | `threshold_items`          | A count rung's threshold, in items                                                                                                                          |
| Reward Unlocked              | `cart_total`               | The bag's total from Shopify's cart, in the shopper's currency                                                                                              |
| Gift Chosen                  | `gift`                     | `variant_id`, `name` and `image_url` of the gift                                                                                                            |
| Upsell Accepted              | `offer_id`                 | The upsell offer's id, or the checkout offer's                                                                                                              |
|                              | `offer_type`               | `frequently_bought_together`, `pairs_well`, `quantity_breaks`, `make_it_a_set`, `refill`, `tier_gap`, `gift_addon`, `upgrade`, `drawer` or `checkout_offer` |
|                              | `items`                    | `[{variant_id, quantity}]`: the products added                                                                                                              |
|                              | `currency`                 | The shopper's currency                                                                                                                                      |

### On every event

| Property          | When                                                                                                                                                      |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shop`            | Always: the store's `myshopify.com` domain, so stores that share one Klaviyo account stay apart                                                           |
| `is_member`       | With **Add membership to events** on: whether the signed-in customer has one of the shop's member tags ([Members](https://www.luxesets.com/docs/members)) |
| `member_tier`     | With membership on, for a member: the member tags the customer has                                                                                        |
| `customer_tags`   | The merchant's **Customer tags to pass through** that the signed-in customer has                                                                          |
| `cart_attributes` | Added Set to Bag, Edited Set, Reward Unlocked, Gift Chosen and Upsell Accepted: the cart attributes the merchant listed, when the cart has them           |

## Extra details

Under **Extra details to send** the merchant lists, by name, up to 10 of each:

| List                          | Sent as                                                                                           |
| ----------------------------- | ------------------------------------------------------------------------------------------------- |
| Line item properties          | `line_properties` on each item of Added Set to Bag and Edited Set, read from the set's cart lines |
| Cart attributes               | `cart_attributes`, from the cart Luxe already read                                                |
| Customer tags to pass through | `customer_tags`, only the listed tags the customer has, matched without regard to capitals        |

Only what is listed is sent, as the shopper typed it, with values cut at 255 characters. A name starting with `_` cannot be listed and is never sent, so Luxe's own `_luxe_*` properties and the `_luxe_touch` attribute never reach Klaviyo. Tags are matched by the embed's Liquid: nothing else about the customer is printed on the page.
