Skip to content

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.

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.

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.

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.

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.

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.