Lore DB | Docs

Analytics & Monitoring

Lore DB uses PostHog for product analytics and error monitoring. All analytics traffic is routed through a first-party reverse proxy to avoid ad-blocker interference.

Cookie consent: Frontend analytics only activate after you accept the cookie consent banner. If you decline, no analytics cookies are set and no data is sent to PostHog from your browser. See our Cookie Policy for details.

What we track

Web (frontend)

EventWhenDetails
Page viewsEvery page load and SPA route changeURL, referrer, device type
User identificationAfter loginEmail and display name linked to session
Ask AI queryUser submits a questionWhether library/system filters are applied
Onboarding funnelNew user signup flowonboarding_startedonboarding_seed_completeonboarding_mcp_opened or onboarding_skippedonboarding_mcp_complete
ErrorsUnhandled JS errors, promise rejections, React crashesError message and stack trace

API and MCP (backend)

Every API endpoint call and MCP tool invocation is tracked as a server_action event with:

  • action — the operation performed (e.g. ask_ai, search, create_doc, list_libraries)
  • source — the channel: api (REST API / web app) or mcp (AI tool via MCP)
  • user — the authenticated user’s email

This allows breakdown of usage by channel, action, and user.

Tracked MCP tools: ask_doc, search_doc, create_doc, read_doc, update_doc, delete_doc, list_libraries, create_library, list_systems, create_system, add_doc_to_library, remove_doc_from_library, move_doc_between_libraries, verify_doc, add_library_to_system, remove_library_from_system, reindex_documents.

Tracked API actions: ask_ai, search, read_doc, create_doc, update_doc, delete_doc, list_docs, list_libraries, create_library, library_import, pdf_import.

What we don’t track

  • Document content — we never send your documents to PostHog
  • Search queries or Ask AI questions — the text is not included in analytics events
  • API keys, credentials, or billing details
  • Any data beyond what’s listed above

Infrastructure

ComponentDetail
ProviderPostHog Cloud (EU)
Reverse proxye.loredb.dev (managed by PostHog, first-party domain)
Frontend SDKposthog-js (npm package for React SPA, CDN snippet for static pages)
Backend SDKposthog Python package (sync mode for serverless reliability)

All analytics traffic stays within the EU. The reverse proxy ensures requests appear as first-party traffic from loredb.dev.

Disabling analytics

Analytics is controlled by the PUBLIC_POSTHOG_KEY environment variable. When unset:

  • No PostHog scripts are loaded on the frontend
  • No events are sent from the backend
  • No network requests to PostHog or the reverse proxy

This is the default for local development and CI environments.

PostHog session replay can be enabled in the PostHog project settings for watching real user sessions. This requires no code changes — it’s controlled entirely from the PostHog dashboard.