LuxeDocsv0.6.0
ANALYTICScustomData v 1

Customer events and pixels

Five Luxe custom events in Shopify's customer events: when each fires, the versioned customData contract, consent, and subscribing from a pixel.

Turning them on

With Settings > Data and integrations > Analytics events on (off by default, on every Luxe plan), the storefront publishes five custom events to Shopify's customer events with Shopify.analytics.publish(name, customData). Custom pixels and app pixels receive them like Shopify's own events. Luxe ships no web pixel of its own and needs no extra access scope.

The publishing script (luxe-events.js) loads after the page has loaded, only while the switch is on, and replays the moments it buffered since the page started, so an event from the first render is not lost. It needs the Luxe app embed. Nothing is published:

  • on headless and Tapcart storefronts (they keep their own events; the theme's DOM events are on window.Luxe.cart and events),
  • for B2B buyers Luxe steps aside for, since no Luxe script loads (B2B buyers),
  • where Shopify.analytics does not exist on the page.

Merchant setup, with the GA4 and Meta pixels Luxe provides: Luxe events in GA4 and Meta.

The events

EventFires
luxe_set_builtEvery slot of a Build-your-own or Fixed set is filled in the Bundle set builder, or a tray pick brings a Collection set to its minimum. Once per set per page view
luxe_set_addedA set is added to the bag from the builder or the tray, or an edited set goes back in it (edited: true). Opening Edit set in a cart publishes nothing
luxe_gift_chosenA shopper chooses a reward gift
luxe_upsell_addedProducts are added from an upsell offer or the checkout offer
luxe_purchase_option_changedA set is switched between one-time and a subscription plan, or between plans, in the builder or the tray

customData

Every event's customData starts with two fields:

FieldTypeMeaning
vnumberThe contract version, 1. A later version only adds fields
surfacestringWhere it happened, such as kit_block, tray, drawer, gift_picker, bar, cart or product

Ids are Shopify's numeric ids as strings, and Luxe's own ids for sets, ladders, rungs and offers. Money is a decimal in the currency's own units (49.5, not cents).

Set events

luxe_set_built and luxe_set_added:

FieldTypeMeaning
set_idstringThe set's id, as kitId in luxe:kit:added
set_namestringThe set's name; empty when the set is not on the page
set_typestringbuild_your_own, collection or fixed; empty when the set is not on the page
itemsarray of {variant_id: string, quantity: number}The build: a builder's picks and fixed components, a tray's picks. At most 50 entries
valuenumberLuxe's predicted set price in the shopper's currency; absent while the set has no price
currencystringThe shopper's currency (ISO 4217)
predictedtruePresent with value: the storefront predicts, checkout decides the price
purchase_optionstringluxe_set_added only: one_time or subscription
editedtrueluxe_set_added only, when an edited set went back in the bag

Gift, upsell and purchase option events

EventFieldTypeMeaning
luxe_gift_chosenladder_idstringThe rewards ladder
rung_idstringThe rung that offers the gift
rung_labelstringThe rung's label; empty when the page does not know it
variant_idstringThe gift chosen
luxe_upsell_addedoffer_idstringThe upsell offer's id, or the checkout offer's
offer_typestringfrequently_bought_together, pairs_well, quantity_breaks, make_it_a_set, refill, tier_gap, gift_addon, upgrade, drawer or checkout_offer
placementstringPRODUCT_PAGE, CART_DRAWER, REWARDS_BAR or SET_BUILDER for an upsell offer; drawer for the checkout offer
itemsarray of {variant_id: string, quantity: number}The products added
valuenumberPredicted, in the shop currency; absent when unknown
currencystringThe shop currency
predictedtruePresent with value
luxe_purchase_option_changedset_idstringThe set
from, tostringone_time or subscription
selling_plan_idstringThe plan chosen, when to is subscription
{
  "v": 1,
  "surface": "kit_block",
  "set_id": "ck_sampler",
  "set_name": "Coffee sampler",
  "set_type": "build_your_own",
  "items": [
    { "variant_id": "44501", "quantity": 1 },
    { "variant_id": "44502", "quantity": 2 }
  ],
  "value": 36,
  "currency": "USD",
  "predicted": true,
  "purchase_option": "one_time"
}

Never in an event: customer data, a customer or cart token, Luxe's fee or Luxe-built revenue.

Luxe does not gate the publish: Shopify's pixel manager applies each visitor's consent to each pixel, by the pixel's Customer privacy permission, exactly as for Shopify's standard events. A custom pixel set to Required with Analytics or Marketing receives nothing from a visitor who has not allowed it. Consent reaches Shopify from any banner that writes the Customer Privacy API (Shopify's own, or a consent app connected through its Shopify app).

Luxe's own analytics beacons are separate and keep their own analytics-consent gating.

Subscribing from a custom pixel

In Shopify admin > Settings > Customer events > Add custom pixel:

const LUXE_EVENTS = [
  "luxe_set_built",
  "luxe_set_added",
  "luxe_gift_chosen",
  "luxe_upsell_added",
  "luxe_purchase_option_changed",
];

for (const name of LUXE_EVENTS) {
  analytics.subscribe(name, (event) => {
    const data = event.customData || {};
    if (data.v !== 1) return; // a version you have not mapped yet
    // Forward to your tool here, for example:
    // myTool.track(name, { set_name: data.set_name, value: data.value, currency: data.currency });
  });
}

Read fields by name and ignore the ones you do not know: a later version of the contract adds fields, it never renames or removes one.

GA4 and Meta

The pixels Luxe provides (Copy custom pixel code in the app) map the events as follows. They stay custom events: Shopify's Google and Meta channels already send add_to_cart / AddToCart and the purchase, so mapping a Luxe event to a standard one would count the same change twice.

Luxe eventGA4 (Tag Manager event)Meta (trackCustom)
luxe_set_builtluxe_set_builtLuxeSetBuilt
luxe_set_addedluxe_set_addedLuxeSetAdded
luxe_gift_chosenluxe_gift_chosenLuxeGiftChosen
luxe_upsell_addedluxe_upsell_addedLuxeUpsellAdded
luxe_purchase_option_changedluxe_purchase_option_changedLuxePurchaseOptionChanged

The GA4 pixel pushes luxe_set_id, luxe_set_name, luxe_set_type, luxe_offer_id, luxe_rung (rung_label), luxe_purchase_option (purchase_option, else to), luxe_item_count (entries in items), value and currency to the data layer. The Meta pixel sends set_name, set_type, offer_id, value and currency.

Analytics only

Anyone can publish a custom event from the browser console, so treat these events as analytics, never as proof of a purchase or a price. Money in them is Luxe's prediction; the order is the record of what was paid. Billing and Luxe's own reports never read them.

Was this page helpful?Last updated 4 October 2026