Skip to content

Cookies and storage

The Shuttlebase snippet uses a small, fixed set of cookies and browser storage keys. This page lists all of them and explains what happens when a browser blocks storage.

The snippet sets these cookies for normal visitors. Its policy permits no others.

All cookies are set client-side via document.cookie. They are first-party, scoped to domain= the registrable domain (eTLD+1, so shared across subdomains, with a host-only fallback when the browser rejects the domain write), path=/, SameSite=Lax, and Secure on HTTPS.

CookiePurposeLifetime
msai_user_idAnonymous visitor UUID. Identifies a returning visitor without any personal data.365 days
msai_bucketed_experimentsMap of experiment to variant assignments. Keeps a visitor in the same variant across visits.365 days
msai_should_trackCached consent decision, so the snippet does not re-query your consent tool on every page. Holds true or false, where true means tracking is allowed.180 days
msai_ujExperiment-level state plus a summary of the visitor’s journey across the site.365 days
KeyPurposeLifetime
msai_user_idMirror of the user ID cookie.No expiry — persists until the visitor clears site data
msai_bucketed_experimentsMirror of the assignment cookie.No expiry — persists until the visitor clears site data
msai_analytics_session_countLifetime session and event counters.No expiry — persists until the visitor clears site data
msai_ujFull journey record; the cookie holds a summary only.No expiry — persists until the visitor clears site data
msai_dqQueue of events pending send, for batching to reduce network traffic.No expiry — persists until the visitor clears site data
KeyPurposeLifetime
msai_analytics_sessionCurrent session record, including UTM parameters and referrer.Tab session
msai_session_event_countEvent counter for the current session.Tab session

When a visitor revokes consent, the snippet clears msai_bucketed_experiments, msai_user_id, msai_analytics_session, and msai_analytics_session_count from cookies, localStorage, and sessionStorage. msai_should_track is deliberately preserved, since it is the record of the refusal.

When consent is later granted, the page reloads so the snippet can start tracking with a clean slate.

These keys exist only for preview, QA, and developer testing. Normal visitors never receive them.

KeyTypePurpose
msai_deployed_onlyCookie or sessionStorageOverrides the snippet to show deployed winners without running experiments.
msai_preview_bucketingsessionStorageState for preview-mode bucketing.
msai_opt_outsessionStorageSession-scoped tracking opt-out for QA.
msai_preview_experiments_cachelocalStorageCache of preview experiment config. Written by writePreviewExperimentsCache().