Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
Self-serve view of analytics data stored on the device — shows what's been captured this session, with Pause and Clear controls.
The <analytics-panel> component lets visitors see exactly what Vanilla Breeze analytics has captured about their current browsing session — no hand-waving about "anonymous data". Users can pause collection for the session, clear stored data, or both.
The panel reads from sessionStorage (vb_sc, vb_q, vb_optout) — the same storage the analytics runtime writes to. No server round-trip, no identifier lookup.
Place the element anywhere — dashboard, privacy page, settings section. The component self-renders on upgrade.
<analytics-panel></analytics-panel>
Add compact for a tighter layout when embedding alongside other UI. The heading and action buttons reduce in size; data readouts stay legible.
<analytics-panel title="Your data" compact></analytics-panel>
Override the default Analytics data
heading with title.
<analytics-panel title="What we've captured"></analytics-panel>
The panel dispatches custom events when the user takes an action, so embedding pages can react (e.g. showing a confirmation toast, updating a status indicator).
| Event | When |
|---|---|
analytics-panel:cleared | After the user clears their session data |
analytics-panel:optout | When the user pauses analytics for this tab |
analytics-panel:optin | When the user resumes analytics for this tab |
document.addEventListener('analytics-panel:optout', () => { console.info('User paused analytics for this session');});
Analytics.setConsent()The panel's Pause analytics
button writes vb_optout to sessionStorage, which the core runtime checks on every Analytics.track() call. The same flag can be set programmatically:
import { Analytics } from 'vanilla-breeze'; Analytics.setConsent(false); // same effect as clicking "Pause analytics"Analytics.setConsent(true); // same effect as clicking "Resume analytics"/code-block <p>The panel and the API share the same <code>sessionStorage</code> key, so they stay in sync automatically. If you set consent via the API while the panel is open, click <strong>Refresh</strong> (or re-render the panel) to reflect the new state.</p>
The panel shows only data the runtime has captured about this tab in this session:
The panel does not display or have access to server-side aggregates. There is no user identifier, no cross-tab history, and no cross-site correlation. Closing the tab clears everything automatically.
role="status".<button> elements — keyboard activatable.<header>, <section>, <footer>.<dl> so screen readers announce labels with their values.data-vb-event — declare trackable click eventsdata-vb-no-track — opt a page region out of analytics