Matomo × Metabase

How to build Matomo dashboards in Metabase

Matomo is an open-source, privacy-first web analytics platform you can self-host or run on Matomo Cloud, keeping full ownership of visitor data. 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 Matomo McpServer plugin and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs Matomo 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 Matomo 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 Matomo.

How do you connect Matomo 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 Matomo McpServer plugin 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 sessions and conversions by channel"
  • Loading a Matomo 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 Matomo daily stats and entities into a database or warehouse with a connector, custom pipeline, or API, then point Metabase at it.

Best for
  • Matomo reporting that marketing leaders depend on
  • Joining Matomo data with CRM, revenue, or product data
  • Long-run trends for sessions and conversions by channel and top pages and entry pages
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 Matomo data in Metabase?

  • Sessions and conversions by channel — built from daily visit summaries and the related pageviews and actions, referrers, goals data your sync exposes.
  • Top pages and entry pages — built from daily visit summaries and the related pageviews and actions, referrers, goals data your sync exposes.
  • Goal conversion by referrer — built from daily visit summaries and the related pageviews and actions, referrers, goals data your sync exposes.
  • Campaign (UTM) performance — built from daily visit summaries and the related pageviews and actions, referrers, goals data your sync exposes.
  • On-site search terms driving conversions — built from daily visit summaries and the related pageviews and actions, referrers, goals data your sync exposes.

Which Matomo dashboards should you build in Metabase?

For: Growth and content teams

Traffic overview

Who arrives, from where, and what they do.

  • Sessions by channel by week (stacked area)
  • Engaged sessions and engagement rate (line)
  • Top landing pages by sessions (table)
  • New vs. returning users (combo)
For: SEO owners

Organic performance

Search visibility and what it earns.

  • Organic clicks and impressions by week (combo)
  • Top queries by clicks and position (table)
  • Pages gaining or losing clicks (table)
  • Branded vs. non-branded clicks (stacked bar)
For: Conversion owners

Conversion funnel

Where visits become signups or purchases.

  • Conversion rate by channel (bar)
  • Landing-page conversion rates (table)
  • Key events by week (line)
  • Funnel step drop-off (funnel)
For: Leadership

Acquisition mix

The paid vs. organic balance over time.

  • Sessions by paid vs. organic (stacked area)
  • Conversions by acquisition type (bar)
  • Cost per session for paid channels (line)
  • Channel mix shift, trailing 12 months (area)

How do you use the Matomo McpServer plugin with the Metabase CLI?

Pair the Matomo McpServer plugin 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 a daily summary of daily visit summaries for the last 90 days.
  • 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 rollups by channel and page are required for traffic and conversion trends.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

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

Matomo McpServer pluginofficial

Transport
Remote HTTP endpoint on your own Matomo instance
Auth
Bearer token — a Matomo token_auth, or OAuth 2.0
Access
Bundled with Matomo Cloud; On-Premise installs the first-party McpServer plugin
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": {
    "matomo": {
      "url": "https://your-matomo.example.com/index.php?module=API&method=McpServer.mcp&format=mcp"
    }
  }
}

The exact endpoint URL for your instance is shown under Administration → General Settings → McpServer. Token auth is the dependable option — the plugin's OAuth support ships with documented limitations like manual token refresh.

TerminalLoad a Matomo 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 daily-visit-summaries export — creates a table AND a model
mb upload csv --file matomo-daily-visit-summaries.csv --collection root

# Refresh that same table later from a new export
mb upload replace <table-id> --file matomo-daily-visit-summaries.csv

Can you generate a Matomo dashboard with AI?

Yes. Use the prompt below with any assistant that can run the Matomo McpServer plugin and the Metabase CLI. It works end to end: if Matomo 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 Matomo Web Analytics Overview dashboard
Create a polished Metabase dashboard for Matomo web 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 traffic by channel, landing-page conversion, organic search performance, and the paid vs. organic mix from Matomo data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for matomo tables and
  models). If durable Matomo 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 Matomo McpServer plugin:
  daily visit summaries, plus pageviews and actions, referrers, goals.
  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
  Matomo — 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: Matomo Web Analytics Overview

Sections:
1. Executive summary: Sessions last 30 days; Conversion rate; Key events;
   Organic clicks; Paid vs. organic share.
2. Traffic: Sessions by channel by week; top landing pages; engagement rate.
3. Conversion: Conversion rate by channel; landing-page conversion table.
4. Organic: Clicks and impressions by week; top queries; branded vs. non-branded.
5. Mix: Paid vs. organic sessions and conversions over time.

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 Matomo data into a database or warehouse?

For dashboards that need history and reliability, land Matomo 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 Matomo Reporting API for control over grain, fields, and refresh cadence.
  • MCP + CSV — use this for quick exploration and one-off slices.

Sync daily visit, page, and goal reports with the dlt Matomo verified source or Fivetran's Matomo Lite connector — there's no Airbyte source. Self-hosters can also read the MySQL archive tables directly, though the Reporting API's pre-aggregated numbers are easier to keep consistent.

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 channel, source, medium, campaign, landing-page, date, sessions, and conversions fields.

How should you model Matomo data in Metabase?

Core tables

TableGrainKey columns
matomo_visits_dailyone row per site per channel per daysite_id, visit_date, channel, visits, unique_visitors, bounce_rate, avg_time_on_site
matomo_pages_dailyone row per page per daypage_url, visit_date, pageviews, unique_pageviews, exit_rate, avg_generation_time
matomo_goal_conversionsone row per goal per channel per daygoal_id, goal_name, visit_date, channel, conversions, conversion_rate, revenue

Modeling advice

  • Build a clean traffic_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 Matomo metrics should you track in Metabase?

MetricDefinitionNotes
Organic clicks & impressionsSearch-driven visits and visibility from Search Console data.Sync early — the API window is 16 months.
Landing-page conversion rateConversions divided by sessions per landing page.Set a minimum session threshold to avoid noise.
Click-through rateClicks divided by impressions in search results.Read it against position — CTR falls off a cliff below the fold.
Conversion rateConversions divided by sessions or visitors per period.Pin the denominator: sessions, users, or visits.

What SQL powers Matomo dashboards in Metabase?

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

Sessions and conversion rate by channel by weekPostgreSQL

The acquisition overview from traffic rollups.

SELECT
  channel_group,
  date_trunc('week', session_date) AS week,
  SUM(sessions) AS sessions,
  SUM(key_events) AS conversions,
  ROUND(100.0 * SUM(key_events) / NULLIF(SUM(sessions), 0), 2)
    AS conversion_rate_pct
FROM traffic_rollups
GROUP BY 1, 2
ORDER BY 2, sessions DESC;
Landing-page conversion rates, trailing 30 daysPostgreSQL

Which pages earn their traffic.

SELECT
  landing_page,
  SUM(sessions) AS sessions,
  SUM(key_events) AS conversions,
  ROUND(100.0 * SUM(key_events) / NULLIF(SUM(sessions), 0), 2)
    AS conversion_rate_pct
FROM traffic_rollups
WHERE session_date >= CURRENT_DATE - INTERVAL '30 days'
GROUP BY landing_page
HAVING SUM(sessions) >= 100
ORDER BY conversions DESC
LIMIT 20;
Sessions and conversions by dayPostgreSQL

The traffic headline from daily rollups.

SELECT
  date_trunc('day', session_date) AS day,
  SUM(sessions) AS sessions,
  SUM(key_events) AS conversions
FROM traffic_rollups
WHERE session_date >= CURRENT_DATE - INTERVAL '62 days'
GROUP BY 1
ORDER BY 1;

What are common mistakes when analyzing Matomo in Metabase?

Syncing raw click or event streams into the warehouse.→ Land daily aggregates, campaign-grain stats, and entity tables. Raw streams belong in Matomo; the warehouse is for trends and joins.
Expecting warehouse numbers to match the tool's UI exactly.→ Sampling, privacy thresholds, timezones, and attribution windows all create gaps. Pick the canonical source per metric and document it.
Reporting sitewide conversion rate as one number.→ Channel mix drives it more than site quality does. Segment by channel and landing page, and watch the segments.
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 Matomo?
No. Metabase reads databases and warehouses. Sync Matomo 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 Matomo?
No — they answer different questions. Matomo 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.
Why don't my Metabase numbers match the Matomo UI?
Usually definitions, not bugs: the UI may apply sampling or privacy thresholding, count sessions differently across timezones, or use a different attribution window. Document which source is canonical for each metric, and expect small, consistent gaps rather than exact matches.
Should I sync raw pageview or event-level data?
Daily rollups by channel, page, and campaign cover most reporting. The exception is GA4's native BigQuery export, which lands raw events for free — there, point Metabase at BigQuery and aggregate with SQL. See organic clicks & impressions and landing-page conversion rate for rollup grains that work.