Overview

Understand the analytics integration in the boilerplate.

AI Boilerplate includes EU-compliant analytics powered by OpenConsent for cookie consent management.

Supported Providers

ProviderTypeDescription
Google AnalyticsAnalyticsPage views, events, and user behavior tracking.
Microsoft ClarityAnalyticsSession recordings and heatmaps for UX insights.

Features

FeatureDescription
Cookie Consent BannerCustomizable banner with accept, reject, and customize options.
Consent-Based LoadingAnalytics scripts load only after the user grants consent.
Cookie PreferencesUsers can change their preferences anytime.
Consent ExpirationAccept lasts 365 days, reject lasts 1 day before re-prompting.
Dashboard Auto-AcceptDashboard auto-accepts consent after authentication (covered by ToS).

How It Works

  1. Cookie consent components are defined in packages/ui/src/components/cookie-consent/.
  2. Google Consent Mode v2 defaults to denied before any scripts load.
  3. Analytics scripts are loaded only after the user grants consent.
  4. On the dashboard, consent is auto-accepted after authentication (covered by Terms of Service).
  5. Consent expiration is managed automatically — accept lasts 365 days, reject lasts 1 day before re-prompting.

Next Steps