Component

Analytics Provider

Headless analytics + experiment helper. Loads Plausible/GA when env is set; no visible UI.

Headless

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].

Installation

import { AnalyticsProvider, trackEvent } from "atroui"

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.

API Reference

PropTypeDefaultDescription
childrenReactNodeApp tree to wrap.