Events
The Shuttlebase snippet collects a fixed set of event types. This page lists the fields every event shares, then describes each event type. For how events are batched and delivered, see Tracking snippet.
Event types
Section titled “Event types”pageview
Section titled “pageview”Fires when a page loads. On single-page apps it also fires on client-side navigations, detected through pushState and popstate, so SPA route changes count as pageviews.
scroll
Section titled “scroll”Fires once per 10% scroll depth milestone, from 10% through 100%. A visitor who scrolls 45% of the way down a page generates four scroll events, one each at 10, 20, 30, and 40.
Fires when a clicked element matches an active click metric. Clicks that match no metric are not sent. The event includes element information and the element’s inner text, truncated to 30 characters.
revenue
Section titled “revenue”Records a purchase. Each one includes the amount, currency, and order or transaction ID, and can include line-item details: product, quantity, price, SKU, and discounts. Revenue feeds the currency metrics described in Metrics and guardrails.
Shopify checkout funnel events
Section titled “Shopify checkout funnel events”On Shopify stores the snippet tracks each checkout step: checkout_started, then contact, address, shipping, and payment information submitted, and finally checkout_completed, which becomes a revenue event.
Custom events
Section titled “Custom events”Your own code can push events through the pre-load queue:
window.msaiClient = window.msaiClient || [];window.msaiClient.push({ event_type: 'newsletter_signup' });The event_type field is required. This works before the snippet loads. The snippet drains the queue once it initializes.