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)
| Event | When | Details |
|---|---|---|
| Page views | Every page load and SPA route change | URL, referrer, device type |
| User identification | After login | Email and display name linked to session |
| Ask AI query | User submits a question | Whether library/system filters are applied |
| Onboarding funnel | New user signup flow | onboarding_started → onboarding_seed_complete → onboarding_mcp_opened or onboarding_skipped → onboarding_mcp_complete |
| Errors | Unhandled JS errors, promise rejections, React crashes | Error 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) ormcp(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
| Component | Detail |
|---|---|
| Provider | PostHog Cloud (EU) |
| Reverse proxy | e.loredb.dev (managed by PostHog, first-party domain) |
| Frontend SDK | posthog-js (npm package for React SPA, CDN snippet for static pages) |
| Backend SDK | posthog 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.