Skip to main content
Every example below is a full POST https://cl.uselayers.com/beacon body. Swap the session_id, event_id, product_id, and attribution_token values for the real ones from your storefront. The event_id should be a fresh ULID or UUID per event. Generate one with crypto.randomUUID() in the browser, or any ULID library.

Single event

product_view

product_click

product_impression

add_to_cart

collection_view

autocomplete

autocomplete_click

Sent when a shopper selects a suggestion from the autocomplete panel. search_query is the selected suggestion, and contextual_data records what the shopper typed, the 1-indexed position of the suggestion, and which section of the panel it came from.
If the shopper’s selection triggers a full search, follow with a search event whose contextual_data.search_source is "autocomplete" so the two events can be joined into a funnel.

block_view

content_view

Sent when a shopper views an article or page recommended by a related content block. content_type is "article" or "page".

content_click

content_impression

Sent when a merchandising banner enters the viewport. banner_id and rule_id come straight off the banner object in the Browse response.

Batched events

Group everything that happened in the last few seconds into one request. The worker dispatches each event independently to its configured pipeline.

With UTM and contextual data

Use marketing_* for attribution and contextual_data for any structured extras (A/B bucket, locale, page template).

App / native shopping channel

Send shopping_channel: "app" explicitly when you can’t rely on User-Agent inference. The worker also auto-detects Tapcart and Fuego via the X-Requested-With header.