Skip to content
Privacy

Analytics & Tracking

The elah.dev website uses two analytics tools. Both are opt-in: nothing loads or sends data until you accept the consent banner, and neither runs if your browser sends a Do-Not-Track signal. The elah libraries themselves (@elah/core and the rest) contain no telemetry — this applies only to the marketing site.

What we track

  • PostHog — privacy-friendly product analytics: page views and a few interaction events (install-command copies, playground launches, export flow). Reverse-proxied through /ingest so it is resilient to ad-blockers.
  • Reddit Pixel — fires a PageVisit event on load and on client-side route changes, used to measure Reddit ad campaigns.

Environment variables

Each tool is inert unless its variable is set. All are NEXT_PUBLIC_ (exposed to the browser, as the client SDKs require) and are read from the repo-root .env — see .env.example.

  • NEXT_PUBLIC_POSTHOG_PROJECT_TOKEN — PostHog project token.
  • NEXT_PUBLIC_POSTHOG_HOST — PostHog host (e.g. https://us.i.posthog.com).
  • NEXT_PUBLIC_REDDIT_PIXEL_ID — Reddit advertiser pixel id.

Leave any of them unset and that tool is never loaded — a clean way to run the site with no tracking at all.

On first visit a banner asks to accept or decline. Until you choose, PostHog is initialised opted-out and the Reddit pixel script is never injected — so no analytics network request happens pre-consent. Accepting opts PostHog in and loads the pixel; declining keeps both off. Your choice is stored in localStorage (elah-analytics-consent) and remembered on return.

If your browser sends Do-Not-Track, both tools stay off and the banner never appears — the signal is treated as a decline.

Changing your choice

Clearing the site's localStorage (or the elah-analytics-consent key) resets the banner on next load. Enabling Do-Not-Track in your browser disables both tools immediately.

Self-hosting

If you deploy your own copy of the site, simply omit the three variables above and no analytics code runs. One known gap: PostHog capture in the AI topics API route (app/api/ai/topics/route.ts) is server-side and fires on that explicit action; it is not covered by the client consent gate.