Segment × Metabase

How to build Segment dashboards in Metabase

Segment is Twilio's customer data platform, collecting events once and routing them to your warehouse and hundreds of downstream tools. Metabase is where you turn that marketing data into shared, trustworthy dashboards. This guide covers two complementary paths: a lightweight API + CLI route that pulls scoped exports with the Segment Public API and loads a CSV into Metabase with the Metabase CLI, and a durable pipeline route that syncs Segment 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 Segment 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 Segment.

How do you connect Segment to Metabase?

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

1 · API + CLI route (AI-assisted)

Live data in, quick analysis out

Pair the Segment Public API with the Metabase CLI. Script a scoped export to CSV, then load it into Metabase as a ready-to-query table and model.

Best for
  • Quick lookups such as "show me event volume by source over time"
  • Loading a Segment 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 API credentials scoped to reporting endpoints
  • CSV uploads are snapshots — refresh or move to the pipeline for history
2 · Pipeline route (warehouse-backed)

Durable dashboards with history

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

Best for
  • Segment reporting that marketing leaders depend on
  • Joining Segment data with CRM, revenue, or product data
  • Long-run trends for event volume by source over time and warehouse sync health and duration
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 Segment data in Metabase?

  • Event volume by source over time — built from source event volume and the related sources, destinations, warehouse syncs data your sync exposes.
  • Warehouse sync health and duration — built from source event volume and the related sources, destinations, warehouse syncs data your sync exposes.
  • Tracking-plan violations by source — built from source event volume and the related sources, destinations, warehouse syncs data your sync exposes.
  • Destination coverage map — built from source event volume and the related sources, destinations, warehouse syncs data your sync exposes.
  • Identified vs. anonymous event share — built from source event volume and the related sources, destinations, warehouse syncs data your sync exposes.

Which Segment dashboards should you build in Metabase?

For: Data engineers

Pipeline health

Whether events and syncs are flowing at all.

  • Sync success rate by destination by week (line)
  • Failed runs and error reasons (table)
  • Sync latency: scheduled vs. landed (line)
  • Destinations with stale data (table)
For: Analytics engineers

Event volume and quality

What's moving through the pipes, and whether it's clean.

  • Events by source by day (stacked area)
  • Volume anomalies vs. trailing average (line)
  • Schema violations and blocked events (table)
  • New event names appearing this week (table)
For: Growth teams

Identity and audiences

Whether profiles resolve and audiences stay fresh.

  • Identified vs. anonymous profile share (line)
  • Audience sizes over time (line)
  • Audience sync freshness by destination (table)
  • Profile merges per week (bar)
For: Leadership

Activation coverage

Whether the customer-data investment reaches the tools that act on it.

  • Destinations by team and status (table)
  • Rows synced to activation tools by week (stacked bar)
  • Coverage: sources instrumented vs. planned (progress)
  • Incidents traced to data delays (number)

How do you use the Segment Public API with the Metabase CLI?

Pair the Segment Public API with the Metabase CLI for fast, hands-on analysis. A short export script covers 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

  • Script an export of the last 30 days of source event volume by source and destination, with statuses.
  • 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

  • Scripted API exports 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.
  • Per-run sync outcomes and daily event counts are required for reliability and volume trends.
  • mb upload csv needs an uploads database configured under Admin → Settings → Uploads.

How do you set up Segment API access and the Metabase CLI?

Segment Public APIAPI

Transport
REST API — scripted export to CSV
Auth
Segment Public API bearer token (workspace-scoped)
MCP status
No CDP MCP server — Twilio's hosted MCP searches documentation only
Best for
Scoped exports and one-off analyses

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)
TerminalExport Segment data to CSV with the Segment Public API
# Daily event volume by source over a 30-day window (Public API).
# Set the window as ISO-8601 UTC timestamps. To compute them:
#   GNU/Linux:  START_TIME=$(date -u -d '30 days ago' +%Y-%m-%dT00:00:00Z)
#   macOS/BSD:  START_TIME=$(date -u -v-30d +%Y-%m-%dT00:00:00Z)
START_TIME="2026-06-01T00:00:00Z"
END_TIME="2026-07-01T00:00:00Z"
curl "https://api.segmentapis.com/events/volume?granularity=DAY&groupBy=source&startTime=$START_TIME&endTime=$END_TIME" \
  -H "Authorization: Bearer $SEGMENT_PUBLIC_API_TOKEN" > segment-volume.json

# Flatten the JSON to CSV (jq, or a few lines of Python),
# then load it into Metabase
mb upload csv --file segment-event-volume.csv --collection root
TerminalLoad a Segment 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 source-event-volume export — creates a table AND a model
mb upload csv --file segment-source-event-volume.csv --collection root

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

Can you generate a Segment dashboard with AI?

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

Prompt for creating a Segment Customer Data Overview dashboard
Create a polished Metabase dashboard for Segment customer data 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 event volume, sync reliability, identity resolution, and whether downstream tools receive fresh data from Segment data.

Step 1 — Find or load the data:
- First, check what already exists in Metabase (search for segment tables and
  models). If durable Segment 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 from the Segment Public API (write and run a short export script):
  source event volume, plus sources, destinations, warehouse syncs.
  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
  Segment — 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: Segment Customer Data Overview

Sections:
1. Executive summary: Events last 7 days; Sync success rate; Stale
   destinations; Identified profile share.
2. Pipeline: Sync success rate and failed runs by destination; latency trend.
3. Volume: Events by source by day; anomalies vs. trailing average.
4. Quality: Schema violations, blocked events, and new event names.
5. Audiences: Sizes over time; sync freshness; rows delivered to activation tools.

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

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

Segment is its own pipeline: the Warehouses destination lands events, identifies, and track tables in Snowflake, BigQuery, Redshift, or Postgres on a schedule. Add the Public API's volume and sync metadata on top and the observability dashboards on this page come straight from your own data.

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 source, destination, event name, date, event counts, sync status, rows moved, and error counts fields.

How should you model Segment data in Metabase?

Core tables

TableGrainKey columns
segment_event_volume_dailyone row per source per daysource_slug, event_date, event_count, allowed, blocked
segment_warehouse_syncsone row per warehouse sync runsync_id, warehouse_id, started_at, finished_at, status, rows_synced, error_code
segment_violationsone row per violation type per source per daysource_slug, event_date, violation_type, event_name, count

Modeling advice

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

MetricDefinitionNotes
Sync success rateSuccessful sync runs divided by all runs, per destination.Weight by rows moved — one big failed run outweighs ten tiny successes.
Data freshnessTime since the last successful sync landed, per destination.Alert on the destinations dashboards actually read from.
Activation rateNew users reaching the value moment, sliced by CDP-defined audiences.Needs identity stitching to be trustworthy.
Conversion rateConversions measured downstream of synced audiences and journeys.Attribute to the audience, not just the last channel.

What SQL powers Segment dashboards in Metabase?

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

Sync success rate by destination by weekPostgreSQL

The pipeline-reliability headline from sync run logs.

SELECT
  destination,
  date_trunc('week', run_started_at) AS week,
  COUNT(*) AS runs,
  COUNT(*) FILTER (WHERE status = 'success') AS successful_runs,
  ROUND(
    100.0 * COUNT(*) FILTER (WHERE status = 'success')
    / NULLIF(COUNT(*), 0), 2
  ) AS success_rate_pct,
  SUM(rows_synced) AS rows_synced
FROM cdp_sync_runs
GROUP BY 1, 2
ORDER BY 1, 2;
Event volume vs. trailing 28-day averagePostgreSQL

Catches silent tracking breakages and double-firing.

WITH daily AS (
  SELECT source, event_date, SUM(event_count) AS events
  FROM event_volume_daily
  GROUP BY 1, 2
)
SELECT
  source,
  event_date,
  events,
  ROUND(AVG(events) OVER (
    PARTITION BY source
    ORDER BY event_date
    ROWS BETWEEN 28 PRECEDING AND 1 PRECEDING
  )) AS trailing_28d_avg,
  ROUND(100.0 * events / NULLIF(AVG(events) OVER (
    PARTITION BY source
    ORDER BY event_date
    ROWS BETWEEN 28 PRECEDING AND 1 PRECEDING
  ), 0) - 100, 1) AS pct_vs_trailing
FROM daily
ORDER BY source, event_date DESC;
Destinations with stale dataPostgreSQL

Freshness check for every downstream tool.

SELECT
  destination,
  MAX(run_finished_at) FILTER (WHERE status = 'success' AND COALESCE(rows_synced, 0) > 0)
    AS last_successful_sync,
  ROUND(EXTRACT(EPOCH FROM (
    NOW() - MAX(run_finished_at) FILTER (WHERE status = 'success' AND COALESCE(rows_synced, 0) > 0)
  )) / 3600, 1) AS hours_since_success
FROM cdp_sync_runs
GROUP BY destination
HAVING MAX(run_finished_at) FILTER (WHERE status = 'success' AND COALESCE(rows_synced, 0) > 0)
  < NOW() - INTERVAL '24 hours'
ORDER BY hours_since_success DESC;

What are common mistakes when analyzing Segment in Metabase?

Syncing raw click or event streams into the warehouse.→ Land daily aggregates, campaign-grain stats, and entity tables. Raw streams belong in Segment; the warehouse is for trends and joins.
Monitoring syncs only when a downstream team complains.→ By then the damage is days old. Land sync run logs in the warehouse and put freshness and success-rate cards on a dashboard someone owns.
Counting a stable delivery gap as an incident.→ Filters, dedupe, and schema enforcement remove events by design. Baseline the delivered/received ratio per destination — alert on the change, not the gap.
Building dashboards from one-off API exports only.→ Scripted exports are useful for exploration; durable dashboards need a database-backed model with history.

Related analytics

Related dashboards

Related integrations

FAQ

Does Metabase connect natively to Segment?
No. Metabase reads databases and warehouses. Sync Segment 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 Segment?
No — they answer different questions. Segment is built for collecting customer data and moving it between tools. Metabase is where you build governed, shareable reporting on top of the same data, and join it with CRM, product, and revenue data.
Isn't Segment already sending data to my warehouse?
Probably — that's the point of a warehouse-connected CDP. But the event data it delivers doesn't monitor the pipeline itself. The dashboards on this page add the observability layer: sync outcomes, volume anomalies, schema violations, and freshness, built from Segment's own logs and metadata next to the data it delivers.
Why don't event counts match between Segment and my destinations?
Filters, deduplication, schema enforcement, and destination-side rejections all remove events in transit — a gap isn't automatically a bug. Track the delivered/received ratio per destination over time: a stable gap is the pipeline working as configured, a widening one is an incident.
Does Segment have an MCP server?
No — and the npm package named like one is unofficial, so skip it. Twilio's hosted MCP (mcp.twilio.com) only searches Twilio, SendGrid, and Segment documentation; it can't query your workspace. The honest quick route is the Public API for pipeline metadata — and since Segment's whole job is landing events in your warehouse, the durable route needs no bridge at all.