Skip to main content
Sanity → SnowflakeIntegration guide

Connecting Sanity to Snowflake

Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. Snowflake's distinguishing feature is that two organisations can join data without either copying it to the other, which turns measurement between partners from a legal negotiation into a query. The join between them succeeds or fails on one thing: whether whatever join key both parties agree on, usually a hashed identifier reaches the front-end conversion, not a Sanity record before the conversion happens, because Snowflake can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Sanity content in Snowflake: a dimension table, joined on ID

Load Sanity into Snowflake as a content dimension with _id, type, title, author, topics, publish dates and slug, storing each revision with _rev and _updatedAt as a validity window. Join page views on the document ID, not URL, exclude drafts, load only production, and dedupe on ID and revision. Orders come from commerce, never Sanity.

In a warehouse, Sanity's role is a content dimension: document _id, type, title, author, topic references, publish dates and slug. Load it on a schedule from the CLI's dataset export or GROQ queries, or from a publish webhook into a loader, and join it to page-view events that carry the document ID the front end wrote into each event. Joining on URL fails the first time an editor changes a slug.

A daily snapshot loses history. If an article performed well in March under a different headline, today's row cannot tell you that. Store each published revision with its _rev and _updatedAt as a validity window, so analyses can join an event to the version that was live when it happened. Exclude documents whose IDs carry the drafts prefix and load only the production dataset.

Sanity adds no conversions; orders arrive from commerce. Snowflake's data-sharing features matter here only if a partner syndicates or sponsors your content and both sides want to measure it without copying data. Then the join key, your document ID or a shared campaign code, needs agreeing before anything is loaded, and every retry of the load needs a deduplication step on document ID and revision.

Sanity → Snowflake · what breaks

Why this join usually fails — Sanity → Snowflake

  1. 01

    Whatever join key both parties agree on, usually a hashed identifier never reaches Sanity

    The front-end application does the routing, the caching and the identifier capture. Single-page navigation is the usual failure and it belongs to the framework rather than to Sanity.

  2. 02

    A headless stack diagnosed at the wrong layer

    Route changes not tracked, identifiers lost between pages — these are front-end framework problems that get filed against the CMS because that is the name everyone knows.

  3. 03

    A clean room that answers a question nobody agreed on

    The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.

  4. 04

    Nothing reconciles afterwards

    Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.

Sanity → Snowflake · the fix

What working looks like — Sanity → Snowflake

  • Whatever join key both parties agree on, usually a hashed identifier on every conversion

  • Conversions arriving in Snowflake

    The row lands in a table you own, joinable to your own data and — through a share or clean room — to a partner's, without either party moving raw records.

  • Reconciled against the source

Sanity → Snowflake · architecture

How Sanity and Snowflake actually connect

  1. 1

    Sanity holds the truth

    Sanity's real-time content APIs make it excellent at what it does and irrelevant to conversion measurement. Establishing that early saves the client money.

  2. 2

    Snowflake needs a click to match

    A schema both sides agree on, consistent types, and identifiers normalised identically before hashing. The failure mode is not rejection but silent divergence — a timestamp in the wrong zone or a trimmed-versus-untrimmed email produces answers that look plausible.

  3. 3

    The identifier is the bridge

    Whatever join key both parties agree on, usually a hashed identifier, captured at the visit and carried into the front-end conversion, not a Sanity record.

  4. 4

    The event source decides reliability

    Send from wherever the money is recorded, not from the content layer.

  5. 5

    Deduplication at the destination

    Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.

Sanity → Snowflake · normal or broken

Working vs. broken, side by side — Sanity → Snowflake

Normal, not a fault

  • Whatever join key both parties agree on, usually a hashed identifier present on the conversion

  • Sent from your commerce or CRM system

  • Deduplicated correctly

    Nothing deduplicates for you. Loads are at-least-once, so a retried pipeline creates duplicate rows and the only protection is a deduplication step you write and actually schedule.

  • Reconciles with the source

Actually broken

  • Whatever join key both parties agree on, usually a hashed identifier missing on most records

    The front-end application does the routing, the caching and the identifier capture. Single-page navigation is the usual failure and it belongs to the framework rather than to Sanity.

  • Sent from the browser

    Route changes not tracked, identifiers lost between pages — these are front-end framework problems that get filed against the CMS because that is the name everyone knows.

  • Counted twice, or not at all

    The technology makes the join possible; it does not make the definitions match. Two organisations measuring the same campaign will disagree about what a conversion is, which window applies and whose attribution model governs — and the query will return a confident number for whichever set of assumptions got written into the SQL.

  • Nobody has reconciled it

Sanity → Snowflake · diagnose

Diagnostic order — Sanity → Snowflake

  1. 01

    Count conversions carrying whatever join key both parties agree on, usually a hashed identifier

  2. 02

    Follow one real conversion end to end

  3. 03

    Identify the front-end framework, not the CMS

    The routing behaviour that breaks tracking belongs to Next.js, Nuxt or whatever renders the site.

  4. 04

    Write down both parties' conversion definitions before writing any query

    Definition mismatch, not technology, is what makes most partner measurement projects produce numbers neither side trusts.

  5. 05

    Read the match rate, not the success message

    Snowflake will not tell you anything is wrong. Verify by querying against each party's own totals and checking for duplicate rows on the join key before trusting any aggregate.

Sanity → Snowflake · prove

How it gets proven — Sanity → Snowflake

Source of truth

Your commerce, CRM or billing system — Sanity has no orders and no customers.

  • Whatever join key both parties agree on, usually a hashed identifier confirmed present on a live conversion.
  • Row counts and revenue reconciled against each source system for a closed window, with duplicates checked on the join key and both definitions documented.
  • The conversion confirmed sourced from the commerce system, with front-end routing verified separately.

Sanity → Snowflake · free audit

What we check in the free audit

  • Count conversions carrying whatever join key both parties agree on, usually a hashed identifier
  • Follow one real conversion end to end
  • Identify the front-end framework, not the CMS
  • Write down both parties' conversion definitions before writing any query
  • Read the match rate, not the success message

Checked against

Your commerce, CRM or billing system — Sanity has no orders and no customers.

Get my free conversion tracking audit

Free30 minutesNo obligation

Sanity → Snowflake · when not to buy

When you don't need this — Sanity → Snowflake

  • Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry whatever join key both parties agree on, usually a hashed identifier.
  • There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
  • If you have no partner to share data with and one cloud, a warehouse you already run does the same job. The sharing capability is what justifies this one.

Sanity → Snowflake · what we deliver

What gets built — Sanity → Snowflake

  • Identifier capture into Sanity

    Capture and persist the identifier server-side in the front-end application, then carry it into the system that records the sale.

  • Event source: your commerce or CRM system

    Send from wherever the money is recorded, not from the content layer.

  • Dispatch to Snowflake

    Batch or streaming loads from your order system, with the raw event retained alongside anything you derive from it.

  • Reversals where they exist

    Handled by the commerce system.

Written guarantee

95%+ tracking accuracy

Measured against Your commerce, CRM or billing system — Sanity has no orders and no customers.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Sanity → Snowflake questions, answered

Export documents on a schedule or from publish webhooks, and keep each revision so performance can be joined to the version live at the time.

Free · 30 min

Get Sanity and Snowflake joined properly

Free30 minutesNo obligation