Connecting Sanity to Salesforce Marketing Cloud
Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. Marketing Cloud is a different product from Salesforce CRM with a different identity model, which catches out almost everyone who assumes a contact in one is a contact in the other. The join between them succeeds or fails on one thing: whether the Subscriber Key reaches the front-end conversion, not a Sanity record before the conversion happens, because Marketing Cloud can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Sanity forms into Marketing Cloud: who decides the Subscriber Key
When Sanity-hosted forms insert into a Marketing Cloud data extension, the integration code must set the Subscriber Key consistent with CRM journeys, often Contact ID. Give each preference option a fixed key separate from its editable label. For email content, a publish webhook writing rows keyed on the Sanity document _id is easier to govern than send-time fetches.
Sanity sites often host newsletter and preference forms whose labels and options editors control. When those forms insert into a Marketing Cloud data extension, the integration code has to decide the Subscriber Key, not the form. If the website keys new subscribers on email while journeys fed from Salesforce CRM key on Contact ID, every web sign-up who is also a CRM contact becomes a second subscriber with a separate preference record.
Keep field keys separate from labels. If an editor renames a preference category in Sanity and the form field name follows the label, the insert either fails or lands in a column the journey does not read, and the subscriber's choice is silently lost. Model each preference option in Sanity with a fixed key the code uses and a label editors can change.
For content in emails, teams either fetch Sanity content at send time from the email itself or sync it into a data extension on publish. Many Marketing Cloud admins restrict outbound calls from email content, so check before building that route; a publish webhook writing rows keyed on the Sanity document _id is easier to govern. Conversions reach Marketing Cloud from commerce or CRM, never from Sanity.
Sanity → Marketing Cloud · what breaks
Why this join usually fails — Sanity → Marketing Cloud
- 01
The Subscriber Key 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.
- 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.
- 03
Two identity models treated as one
Marketing Cloud's Subscriber Key and CRM's Contact ID are separate concepts, and Contact Builder's configuration decides whether they relate at all. Getting this wrong does not produce an error — it produces a customer who exists twice, receives everything twice, and appears in reporting as two people.
- 04
Nothing reconciles afterwards
Check the subscriber record and the journey history, not the API response. A successful insert into an unwatched data extension looks identical to a successful one into the right extension.
Sanity → Marketing Cloud · the fix
What working looks like — Sanity → Marketing Cloud
The Subscriber Key on every conversion
Conversions arriving in Marketing Cloud
The record lands in the data extension, the journey's entry criteria evaluate on its schedule, and sends follow.
Reconciled against the source
Sanity → Marketing Cloud · architecture
How Sanity and Marketing Cloud actually connect
- 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
Salesforce Marketing Cloud needs a click to match
The Subscriber Key, the data extension the journey listens to, and the fields its decision splits reference. An event landing in the wrong data extension will be stored correctly and trigger nothing.
- 3
The identifier is the bridge
The Subscriber Key, captured at the visit and carried into the front-end conversion, not a Sanity record.
- 4
The event source decides reliability
Send from wherever the money is recorded, not from the content layer.
- 5
Deduplication at the destination
Marketing Cloud does not deduplicate journey entries for you. A record inserted twice can enter a journey twice, and because journeys span email, SMS and push the duplicate reaches the customer more than once.
Sanity → Marketing Cloud · normal or broken
Working vs. broken, side by side — Sanity → Marketing Cloud
Normal, not a fault
The Subscriber Key present on the conversion
Sent from your commerce or CRM system
Deduplicated correctly
Marketing Cloud does not deduplicate journey entries for you. A record inserted twice can enter a journey twice, and because journeys span email, SMS and push the duplicate reaches the customer more than once.
Reconciles with the source
Actually broken
The Subscriber Key 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
Marketing Cloud's Subscriber Key and CRM's Contact ID are separate concepts, and Contact Builder's configuration decides whether they relate at all. Getting this wrong does not produce an error — it produces a customer who exists twice, receives everything twice, and appears in reporting as two people.
Nobody has reconciled it
Sanity → Marketing Cloud · diagnose
Diagnostic order — Sanity → Marketing Cloud
- 01
Count conversions carrying the Subscriber Key
- 02
Follow one real conversion end to end
- 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.
- 04
Confirm what Subscriber Key is actually set to in this org
Before sending anything. It is a configuration decision made once, often years ago, and every integration built afterwards inherits it.
- 05
Read the match rate, not the success message
Check the subscriber record and the journey history, not the API response. A successful insert into an unwatched data extension looks identical to a successful one into the right extension.
Sanity → Marketing Cloud · prove
How it gets proven — Sanity → Marketing Cloud
Source of truth
Your commerce, CRM or billing system — Sanity has no orders and no customers.
- The Subscriber Key confirmed present on a live conversion.
- Records confirmed on single subscriber records in the correct data extension, with the triggered journey verified in a non-production business unit first.
- The conversion confirmed sourced from the commerce system, with front-end routing verified separately.
Sanity → Marketing Cloud · free audit
What we check in the free audit
- Count conversions carrying the Subscriber Key
- Follow one real conversion end to end
- Identify the front-end framework, not the CMS
- Confirm what Subscriber Key is actually set to in this org
- Read the match rate, not the success message
Checked against
Your commerce, CRM or billing system — Sanity has no orders and no customers.
Free30 minutesNo obligation
Sanity → Marketing Cloud · when not to buy
When you don't need this — Sanity → Marketing Cloud
- Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the Subscriber Key.
- There is no Sanity-specific build. Fix the front end and the commerce integration; the CMS is not in the path.
- If you are on Salesforce CRM but sending email through a simpler platform, adding Marketing Cloud brings an identity model to reconcile that you currently do not have to think about.
Sanity → Marketing Cloud · what we deliver
What gets built — Sanity → Marketing Cloud
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 Marketing Cloud
A server-side insert into the data extension the journey is configured against, keyed on Subscriber Key.
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.
From $400 · See packages
FAQ
Sanity → Marketing Cloud questions, answered
Only if Marketing Cloud uses email as Subscriber Key everywhere. If CRM journeys use Contact ID, look up and reuse it.
Often a field name changed with its label in Sanity, so the insert misses the column. Keep fixed keys.
Almost always because the Subscriber Key never reached the front-end conversion, not a Sanity record. 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. Measure coverage before debugging the dispatch.
Marketing Cloud identifies people by Subscriber Key, which you define. It is not the CRM Contact ID unless somebody deliberately made it so, and in many orgs the two are unrelated. Sending an event keyed on the wrong one creates a second subscriber rather than updating the first, which splits the person across two journeys.
Your commerce or CRM system. Send from wherever the money is recorded, not from the content layer.
Check the subscriber record and the journey history, not the API response. A successful insert into an unwatched data extension looks identical to a successful one into the right extension.
More on Sanity → Marketing Cloud
- Stripe → Marketing CloudConnecting Stripe to Salesforce Marketing Cloud
- PayPal → Marketing CloudConnecting PayPal to Salesforce Marketing Cloud
- Shopify → Marketing CloudConnecting Shopify to Salesforce Marketing Cloud
RELATED GUIDES
Where Sanity → Marketing Cloud fits in the rest of your tracking
- Duda → Marketing CloudConnecting Duda to Salesforce Marketing Cloud
- Contentful → Marketing CloudConnecting Contentful to Salesforce Marketing Cloud
- AEM → Marketing CloudConnecting Adobe Experience Manager to Salesforce Marketing Cloud
- Sanity → IterableConnecting Sanity to Iterable
- Sanity → KlaviyoConnecting Sanity to Klaviyo
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Craft → Marketing CloudConnecting Craft CMS to Salesforce Marketing Cloud
- Statamic → Marketing CloudConnecting Statamic to Salesforce Marketing Cloud
Free · 30 min
Get Sanity and Marketing Cloud joined properly
Free30 minutesNo obligation
