Run the Measurement Engine
in your own warehouse.
An open-source CLI for warehouse-native marketing attribution. Connect any warehouse, add any data source, and run cross-channel attribution locally — your data never leaves your infrastructure.
$ curl -fsSL https://segmentstream.com/cli/install.sh | shOne command. Your whole project.
Run segmentstream init in any repository. It scaffolds a config.yaml and the folders where your sources, destinations, transformations, and attribution models live — version-controlled, reviewable, and entirely yours.
$ segmentstream init
✓ Created config.yaml
✓ Created sources/ · destinations/
✓ Created transformations/ · attribution_models/
✓ Project ready — connect a warehouse with segmentstream auth addAuthenticate any warehouse.
One command connects BigQuery, Snowflake, or Databricks — each via its best-practice login. The credential is saved to your OS keychain or a gitignored .env; config.yaml only references it by name. Secrets never touch config.yaml, and your data never leaves your warehouse.
$ segmentstream auth add bigquery
→ Opening browser for Google sign-in…
✓ Authenticated as you@acme.com
✓ Wrote config.yaml — no secret to store# config.yaml — commit this
warehouse:
type: bigquery
project: acme-analytics
dataset: segmentstream
auth: bigquery # the credential from 'auth add'; method lives there$ segmentstream auth add snowflake
? Account identifier: acme-xy12345
? User: loader
? Password: ••••••••
✓ Connection verified
✓ Wrote config.yaml — secret saved to .env (gitignored)# config.yaml — commit this
warehouse:
type: snowflake
account: acme-xy12345
database: ANALYTICS
schema: SEGMENTSTREAM
warehouse: COMPUTE_WH
auth: snowflake # credential saved by 'auth add snowflake'$ segmentstream auth add databricks
→ Opening browser for Databricks sign-in…
✓ Authenticated — token stored in your OS keychain
✓ Wrote config.yaml — no secret to store# config.yaml — commit this
warehouse:
type: databricks
host: acme.cloud.databricks.com
http_path: /sql/1.0/warehouses/abc123
catalog: analytics
schema: segmentstream
auth: databricks # OAuth token lives in the credential / OS keychainAdd any data source.
Every source is one of three types — events, costs, or conversions. Start with built-in connectors for the platforms you use, or describe a custom one and it's generated for you.
# config.yaml
sources:
- name: ga4
type: events
connector: ga4_bigquery_export
auth: bigquery# config.yaml
sources:
- name: meta
type: costs
connector: meta
auth: meta# config.yaml
sources:
- name: attio
type: conversions
connector: attio
auth: attio
conversions:
- name: deal_won
value: amountBuilt-in models, or your own.
Pick a built-in attribution model — first-click, multi-touch, predictive — or drop a custom model in attribution_models/ and reference it by name. The engine handles identity stitching and maturation; your model just defines the credit rule.
# config.yaml
attribution:
model: first_click # or last_click · linear · position_based · predictive# config.yaml
attribution:
model: weighted_b2b # resolves to attribution_models/weighted_b2b/-- attribution_models/weighted_b2b/model.sql
-- 60% to the first touch, 40% across the rest
select
touchpoint_id,
conversion_id,
case when is_first_touch then 0.6
else 0.4 / nullif(other_touches, 0) end as credit
from {{ ref('stitched_journeys') }}Run it locally.
One command runs the full pipeline — identity stitching, attribution, and reporting — and writes the results straight back to your warehouse.
$ segmentstream run
✓ Identity graph: 1.2M users stitched
✓ First-click attribution across 14 channels
→ Report written to acme-analytics.segmentstream.reportsSend conversions back out.
Forward the conversions you trust to ad platforms through their server-side APIs — Meta CAPI, Google Enhanced Conversions, and more. It reuses the connection you already authenticated, so there's nothing new to set up.
# config.yaml
destinations:
- name: meta-capi
connector: meta
auth: meta # reuses your Meta connection
sends: [purchase]Run it locally. Any warehouse, any source.
$ curl -fsSL https://segmentstream.com/cli/install.sh | shThe full Measurement Engine, on your terminal.
Every model the platform runs is available from the CLI — explained in full, with no black boxes.
Bring measurement into your terminal.
The SegmentStream CLI is in private beta. Request access and run attribution where your data already lives.