PostHog × Metabase

How to build PostHog dashboards in Metabase

PostHog is an open-source product analytics platform with events, funnels, session replay, feature flags, and experiments. Metabase is where you turn that marketing data into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight MCP + CLI route that pulls live data with the PostHog MCP and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs PostHog daily stats into a database so you can build dashboards anyone can read.

Heads up: Metabase connects to databases and warehouses — it does not ship a native PostHog connector, and a BI warehouse is the wrong home for raw click or event streams. Sync daily aggregates, entities, and stats — campaigns, channels, rollups, subscribers — and leave the raw firehose in PostHog.

How do you connect PostHog to Metabase?

Most teams combine both routes: use MCP and CLI uploads for a fast first pass, then move recurring marketing reporting to a warehouse-backed model.

1 · MCP + CLI route (AI-assisted)

Live data in, quick analysis out

Pair the PostHog MCP with the Metabase CLI. Use MCP for live lookups, write a scoped result to CSV, then load it into Metabase as a ready-to-query table and model.

Best for
  • Quick lookups such as "show me activation funnel by signup source"
  • Loading a PostHog export into Metabase in seconds
  • Spot-checks and one-off analyses without a warehouse
Trade-offs
  • Great for exploration, not governed recurring reporting
  • Use read-only/scoped credentials wherever the MCP server supports them
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable dashboards with history

Sync PostHog daily stats and entities into a database or warehouse with a connector, custom pipeline, or API, then point Metabase at it.

Best for
  • PostHog reporting that marketing leaders depend on
  • Joining PostHog data with CRM, revenue, or product data
  • Long-run trends for activation funnel by signup source and retention cohorts by feature usage
Trade-offs
  • You own the refresh schedule and the rollup grain
  • Sync daily aggregates and entities — not raw event streams
  • Metric definitions must be consistent across channels and teams

What can you analyze from PostHog data in Metabase?

  • Activation funnel by signup source — built from event rollups and the related events, persons, sessions data your sync exposes.
  • Retention cohorts by feature usage — built from event rollups and the related events, persons, sessions data your sync exposes.
  • Experiment exposure and conversion — built from event rollups and the related events, persons, sessions data your sync exposes.
  • Active users by product area — built from event rollups and the related events, persons, sessions data your sync exposes.
  • Account-level engagement for B2B — built from event rollups and the related events, persons, sessions data your sync exposes.

Which PostHog dashboards should you build in Metabase?

For: Growth PMs

Activation funnel

Whether new signups reach the product's value moment.

  • Signup-to-activation funnel (funnel)
  • Activation rate by signup cohort (line)
  • Time to activation distribution (bar)
  • Activation by acquisition channel (table)
For: Product teams

Engagement and retention

Whether activated users keep coming back.

  • Weekly retention cohorts (heatmap or table)
  • DAU/WAU/MAU trends (line)
  • Feature adoption by segment (bar)
  • Stickiness ratio DAU/MAU (line)
For: Marketing teams

Channel quality

Which acquisition sources send users who stay.

  • Activation rate by channel (bar)
  • Day-30 retention by channel (table)
  • CAC vs. LTV by channel (scatter or table)
  • Signups by channel by week (stacked bar)
For: Leadership

Growth accounting

New, retained, resurrected, and churned users in one view.

  • Growth accounting waterfall (bar)
  • Net user growth by month (line)
  • Churned users and churn rate (combo)
  • Quick ratio trend (line)

How do you use the PostHog MCP with the Metabase CLI?

Pair the PostHog MCP with the Metabase CLI for fast, hands-on analysis. MCP is useful for scoped lookups and summarized exports; the Metabase CLI's upload command loads CSV data into Metabase and creates a ready-to-query table and model.

Example workflow

  • Ask the MCP server for daily event rollups for your core activation events.
  • Export the result as CSV, keeping stable IDs, channels, campaigns, and dates.
  • Run mb upload csv to load it into Metabase as a table and model, then build questions and dashboards on top.

Be honest about the limits

  • MCP lookups are excellent for exploration, not scheduled reporting.
  • A CSV upload is a snapshot; refresh it with mb upload replace or move to the pipeline for real history.
  • Daily event rollups and a stable user ID are required for funnels, retention, and activation trends.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up PostHog MCP and the Metabase CLI?

PostHog MCPofficial

Transport
Hosted remote MCP via Streamable HTTP
Auth
PostHog personal API key as a Bearer token
Best for
Live scoped lookup and export

Metabase CLIofficial

Install
npm install -g @metabase/cli
Auth
mb auth login
Load data
mb upload csv --file data.csv
Requires
An uploads database (Admin → Settings → Uploads)
MCPExample MCP client config
{
  "mcpServers": {
    "posthog": {
      "url": "https://mcp.posthog.com/mcp",
      "headers": {
        "Authorization": "Bearer your-personal-api-key"
      }
    }
  }
}

The hosted server auto-routes to your US or EU data region, and npx @posthog/wizard mcp add automates client setup. It can run HogQL queries directly — handy for scoped, summarized exports.

TerminalLoad a PostHog CSV with the Metabase CLI
# Install the Metabase CLI
npm install -g @metabase/cli

# Log in (opens your browser; requires Metabase v62+)
mb auth login --url https://your-metabase.example.com

# Load a event-rollups export — creates a table AND a model
mb upload csv --file posthog-event-rollups.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file posthog-event-rollups.csv

Can you generate a PostHog dashboard with AI?

Yes. Use the prompt below with any assistant that can run the PostHog MCP and the Metabase CLI. It works end to end: if PostHog tables already exist in Metabase it analyzes those; otherwise it pulls scoped, summarized data over MCP, loads it with mb upload csv, then builds the dashboard and caveats any metric that needs missing history.

Prompt for creating a PostHog Product Analytics Overview dashboard
Create a polished Metabase dashboard for PostHog product analytics analytics.
Work end to end: get the data into Metabase if it isn't there yet, then build.

Goal: Help marketing and growth leaders understand activation, retention, engagement, and which acquisition channels send users who stay from PostHog data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for posthog tables and
  models). If durable PostHog data is already present — synced from a warehouse
  or uploaded earlier — use it and skip to Step 2.
- If nothing is there, pull a scoped, summarized export with the PostHog MCP:
  event rollups, plus events, persons, sessions.
  Prefer daily aggregates over raw events. Write each result to a CSV,
  then load it with the Metabase CLI — run "mb upload csv --file <export>.csv" so
  each upload creates a table and a ready-to-query model. Use "mb upload replace
  <table-id> --file <export>.csv" to refresh an existing table instead of creating
  duplicates.

Step 2 — Inspect before querying:
Do not assume exact table or column names. Inspect available fields, channels,
campaigns, dates, and whether daily history exists before creating trend or
pacing cards.

Important:
- Build on whatever data is present; don't claim Metabase connects natively to
  PostHog — it reads a database or CLI-uploaded tables.
- Never try to load raw event or click streams into Metabase; use daily
  aggregates, campaign-grain stats, and entity tables.
- Only compute rates (CTR, conversion rate, ROAS, CAC) when both numerator and
  denominator exist — and state the attribution model when reporting conversions.
- Exclude test campaigns and internal traffic from headline cards, and keep
  currency consistent when spend spans accounts.
- A single CSV is a point-in-time snapshot: only build trend cards if there is a
  usable date column or multiple periods have been uploaded.

Dashboard title: PostHog Product Analytics Overview

Sections:
1. Executive summary: Signups last 30 days; Activation rate; WAU; Day-30
   retention; Churned users.
2. Activation: Signup-to-activation funnel; activation by cohort and channel.
3. Retention: Weekly cohort retention; DAU/WAU/MAU; stickiness.
4. Channels: Activation and retention by acquisition channel; CAC vs. LTV.
5. Growth accounting: New, retained, resurrected, churned by month.

Filters: Date range, Channel, Campaign, Country, Device, Segment.

Output: Build the dashboard if you have permission; otherwise provide the exact
questions, SQL, model definitions, and layout. Include caveats for any metric
that cannot be calculated from the available data.

How do you sync PostHog data into a database or warehouse?

For dashboards that need history and reliability, land PostHog daily stats and entities in a database first, then connect Metabase to that database.

Connector options

  • Managed ETL — use a connector when one covers the objects you need.
  • Custom pipeline — use the PostHog batch exports for control over grain, fields, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

PostHog Cloud ships managed batch exports to BigQuery, Snowflake, Postgres, Redshift, and S3 — usually the shortest path. The Airbyte PostHog source and Fivetran's connector work too, and self-hosted instances can point Metabase straight at ClickHouse.

Notes

  • Decide the rollup grain first (daily per campaign/channel is the workhorse) — it drives warehouse cost and every trend card.
  • Land raw entity tables first, then build clean Metabase models on top.
  • Normalize user ID, event name, event date, acquisition channel, and plan fields.

How should you model PostHog data in Metabase?

Core tables

TableGrainKey columns
posthog_event_rollupsone row per event per dayevent_date, event_name, event_count, unique_persons
posthog_personsone row per person (mutable — upsert on sync)person_id, created_at, initial_utm_source, initial_referrer, properties_plan, country
posthog_sessionsone row per sessionsession_id, person_id, started_at, duration_seconds, entry_url, exit_url

Modeling advice

  • Build a clean event_rollups model with common columns across tools, so multi-channel dashboards don't fork definitions.
  • Separate entity tables (campaigns, audiences, pages) from daily time-series rollups.
  • Exclude test campaigns and internal traffic from headline metrics; keep channel and campaign as explicit columns.
  • Use stable IDs for campaign, channel, and user joins; display names change.

Which PostHog metrics should you track in Metabase?

MetricDefinitionNotes
Activation rateNew users reaching the value moment divided by all signups.Define activation from behavior, not time in app.
Conversion rateUsers completing a step divided by users entering it.Funnels need a stable user ID across steps.
Customer acquisition costSpend divided by new customers, joined from ad data.Pair with LTV per channel for the full picture.
Churn rateUsers or accounts lost divided by those at risk in the period.Retention cohorts explain churn better than one number.

What SQL powers PostHog dashboards in Metabase?

These assume a cleaned analytical model in a warehouse (PostgreSQL dialect). Adjust table and column names to match your pipeline.

Activation rate by signup cohortPostgreSQL

Signups reaching the value moment within 7 days.

SELECT
  date_trunc('week', u.signup_at) AS signup_week,
  COUNT(*) AS signups,
  COUNT(*) FILTER (WHERE u.activated_at IS NOT NULL
    AND u.activated_at <= u.signup_at + INTERVAL '7 days') AS activated_7d,
  ROUND(
    100.0 * COUNT(*) FILTER (WHERE u.activated_at IS NOT NULL
      AND u.activated_at <= u.signup_at + INTERVAL '7 days')
    / NULLIF(COUNT(*), 0), 1
  ) AS activation_rate_pct
FROM users u
GROUP BY 1
ORDER BY 1;
Week-2 retention by signup cohortPostgreSQL

A simple cohort retention starting point.

SELECT
  date_trunc('week', u.signup_at) AS cohort_week,
  COUNT(DISTINCT u.user_id) AS cohort_size,
  COUNT(DISTINCT e.user_id) FILTER (
    WHERE e.event_date BETWEEN u.signup_at + INTERVAL '7 days'
      AND u.signup_at + INTERVAL '14 days'
  ) AS retained_week_2
FROM users u
LEFT JOIN event_rollups_by_user e ON e.user_id = u.user_id
GROUP BY 1
ORDER BY 1;
Weekly active users trendPostgreSQL

The engagement headline from event rollups.

SELECT
  date_trunc('week', event_date) AS week,
  COUNT(DISTINCT user_id) AS weekly_active_users
FROM event_rollups_by_user
WHERE event_date >= CURRENT_DATE - INTERVAL '6 months'
GROUP BY 1
ORDER BY 1;

What are common mistakes when analyzing PostHog in Metabase?

Syncing raw click or event streams into the warehouse.→ Land daily aggregates, campaign-grain stats, and entity tables. Raw streams belong in PostHog; the warehouse is for trends and joins.
Counting events instead of users.→ Ten events from one power user aren't ten engaged users. Anchor activation and engagement metrics on distinct users.
Ignoring identity merges in synced data.→ Product analytics tools merge anonymous and identified IDs over time. Sync the merge mappings, or funnels will undercount.
Building dashboards from live MCP lookups only.→ MCP is useful for exploration; durable dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to PostHog?
No. Metabase reads databases and warehouses. Sync PostHog daily stats and entities into a database first, or upload a CSV with the Metabase CLI, then build Metabase models and dashboards on top.
Should Metabase replace PostHog?
No — they answer different questions. PostHog is built for running campaigns and day-to-day operations in its own UI. Metabase is where you build governed, shareable reporting on top of the same data, and join it with CRM, product, and revenue data.
Should I sync every raw PostHog event into my warehouse?
Only if you'll use them. Daily event rollups plus a users table cover activation, retention, and engagement dashboards. If you do want raw events, use the vendor's managed warehouse export rather than API scraping — and budget for identity-merge handling.
How do I join product analytics with marketing spend?
Land both in the same warehouse with a shared key: users carry an acquisition channel (from UTM or attribution data), ad platforms report spend by channel. That join powers CAC by channel, activation rate by channel, and the "which channels send users who stay" question no single tool answers.