Dora docs
Skip to Content

Connect PostHog

Connect Dora to a PostHog project and query product analytics with HogQL. A desktop PostHog client for exploring events, persons, sessions, and groups next to your databases.

View as Markdown

Dora is a desktop PostHog client: point it at a PostHog project and query your product analytics with HogQL, the SQL-like language PostHog runs on. Dora talks to the HogQL Query API directly, so you can explore events, persons, sessions, and groups from the same keyboard-first workbench you use for Postgres, MySQL, SQLite, and libSQL databases. No Postgres wire protocol, no separate analytics tab, no context switch.

With a personal API key

  1. In your PostHog instance, go to Project Settings: Project API Key.
  2. Copy the personal API key (starts with phx_...).
  3. Note your region (US or EU) and project ID from Project Settings.
  4. In Dora open the connection dialog and select PostHog from the provider tiles. Paste the API key, select the region, and enter the project ID.
  5. Click Test, then Connect. Dora validates the key and your tables appear in the sidebar.

PostHog connections are read-only. Dora queries the HogQL API, which does not support writes. The API key is stored encrypted on-device.

Regions

PostHog Cloud serves two regions, and your region decides which host Dora calls:

  • US: us.posthog.com
  • EU: eu.posthog.com

Your region is visible in your PostHog instance URL. Self-hosted PostHog instances are not supported yet; connect PostHog Cloud (US or EU).

What you can query

Once connected, PostHog behaves like any other data source in Dora:

  • Browse tables: events, persons, sessions, and groups
  • Inspect schemas and column types in the sidebar
  • Run HogQL in the SQL console, with ClickHouse-style functions for arrays, nested data, and time-series
  • Export results and reuse queries from query history

HogQL example, the top 20 events over the last week:

SELECT
  event,
  count() AS count
FROM events
WHERE timestamp > now() - INTERVAL 7 DAY
GROUP BY event
ORDER BY count DESC
LIMIT 20

Built-in analytics dashboard

Beyond the raw query surface, Dora ships a PostHog analytics view that turns your project into a dashboard without writing HogQL: KPI tiles for events, users, pageviews, and sessions, an activity chart, breakdowns of top events, pages, browsers, referrers, countries, and devices, and a monitored-sites table. Switch the whole dashboard between 7, 14, 30, and 90 days, click any breakdown slice to drill into it, and toggle exclude localhost to drop development traffic so the numbers reflect real usage.

See Analytics for the full panel reference and a walkthrough of the dashboard.

Edit this page on GitHub

Last updated on