Headless
CLI registryAnalytics Provider
Headless analytics + experiment helper. Loads Plausible/GA when env is set; no visible UI.
Preview → install → use
01
Preview
npx shadcn@latest add @atroui/analytics-providerHeadless
AnalyticsProvider - scripts + experiments, no chrome
Mount once near the root. Loads Plausible / GA when env is set, fires page_view, and exposes sticky A/B variants via useExperiment.
- NEXT_PUBLIC_PLAUSIBLE_DOMAINnot set
- NEXT_PUBLIC_GA_IDnot set
In development, events log to the browser console as [analytics].
Source lands in your repo. Setup: Installation · Registry catalog.
02
Usage
Mount once in the root layout. Set NEXT_PUBLIC_PLAUSIBLE_DOMAIN and/or NEXT_PUBLIC_GA_ID. Marked Headless in the catalog - pair with ThemeProvider, not a visual section.
03
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | App tree to wrap. |
Analytics Provider