lilith-platform.live/codebase/@features/analytics
Claude Code 25d2c7ad65 init(codebase-default): 🎉 Implement foundational directory structure with core modules and utility files
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-03-25 22:50:24 -07:00
..
README.md init(codebase-default): 🎉 Implement foundational directory structure with core modules and utility files 2026-03-25 22:50:24 -07:00

analytics

Analytics tracking for lilith-platform.live.

Package Reference

This feature uses @lilith/analytics-client (published on Verdaccio) rather than copying the full platform-analytics feature from lilith-platform.

The full analytics feature in lilith-platform (codebase/features/platform-analytics/) includes a 16-route provider dashboard, A/B testing, cost tracking, and revenue reporting. That infrastructure is not appropriate for the .live landing platform.

Usage

Install the published client package:

{
  "dependencies": {
    "@lilith/analytics-client": "^1.0.2"
  }
}

Page view tracking

import { usePageViewTracking } from '@lilith/analytics-client/react'

function AppRoutes() {
  usePageViewTracking()
  return <Routes>...</Routes>
}

Analytics provider (wraps app root)

import { AnalyticsProvider } from '@lilith/analytics-client/react'

function App() {
  return (
    <AnalyticsProvider>
      <AppRoutes />
    </AnalyticsProvider>
  )
}

When to graduate to full analytics

When lilith-platform.live needs its own analytics dashboard, copy codebase/features/platform-analytics/backend-api/ from lilith-platform and adapt the analytics-gateway module (the ingest endpoint).

The external-platform-analytics module handles third-party event ingestion (separate from the provider dashboard routes).