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

block_view

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.