Connecting Sanity to Braze
Sanity is a headless content platform, which means like every headless CMS it holds no commercial record and the tracking question lives elsewhere. Braze is mobile-first lifecycle messaging, which means it resolves to a user rather than to a click and its most valuable channels — push and in-app — exist nowhere near a browser. The join between them succeeds or fails on one thing: whether the Braze external user ID reaches the front-end conversion, not a Sanity record before the conversion happens, because Braze can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Sanity content in Braze: Catalogs or Connected Content, not events
This pair moves content into messages: Braze Connected Content calls Sanity's query API at send time, or a publish webhook upserts documents into a Braze Catalog. Select the language matching the user's Braze attribute, serialize Portable Text to plain text or HTML, and sync unpublish and delete events. Purchases come from your app or backend under external_id.
What people actually connect here is content flowing into messages. There are two routes: Braze Connected Content calling Sanity's CDN-backed query API at send time, or a Sanity publish webhook that upserts each document into a Braze Catalog. Connected Content is quicker to set up; a Catalog avoids one call to Sanity per recipient on a large push. Check the Catalog limits on your Braze plan before choosing it for a big content library.
Localization is where this pair breaks. Sanity projects store translations either as fields on one document or as separate documents per language, and the query has to select the language matching the user's Braze language attribute. A GROQ query that quietly falls back to the default language sends English push to Spanish-speaking users. Portable Text is the other trap: inserted raw, it renders as JSON in a notification. Serialize it to plain text or HTML in the query or in the sync step.
Purchases and sign-ups reach Braze from your app SDK or billing backend under the external_id. A Sanity webhook knows about documents, never about people, so it should only ever touch content. If you sync to a Catalog, subscribe to delete and unpublish as well, or campaigns keep recommending articles that no longer exist.
Sanity → Braze · what breaks
Why this join usually fails — Sanity → Braze
- 01
The Braze external user ID 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
Duplicate events sending duplicate push notifications
A duplicate here is visible to your customer on their lock screen, twice, and the second one is the reason they turn push off permanently. This is a more expensive mistake than a double-counted conversion in an ad platform, because the damage is not recoverable.
- 04
Nothing reconciles afterwards
Braze shows events on the user profile within moments. Check the profile, not the API response, and specifically check whether an anonymous device profile has been created alongside the real one.
Sanity → Braze · the fix
What working looks like — Sanity → Braze
The Braze external user ID on every conversion
Conversions arriving in Braze
The event lands on the user profile, triggers whatever campaigns depend on it, and becomes available for segmentation across push, email and in-app.
Reconciled against the source
Sanity → Braze · architecture
How Sanity and Braze 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
Braze needs a click to match
Braze needs the external user ID and a well-named event with its properties. An event with no external ID lands on an anonymous device profile that may never merge with the real user.
- 3
The identifier is the bridge
The Braze external user ID, 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
Braze does not deduplicate for you. A purchase sent from both your app SDK and your server produces two events, two campaign triggers and potentially two push notifications to a customer who bought once.
Sanity → Braze · normal or broken
Working vs. broken, side by side — Sanity → Braze
Normal, not a fault
The Braze external user ID present on the conversion
Sent from your commerce or CRM system
Deduplicated correctly
Braze does not deduplicate for you. A purchase sent from both your app SDK and your server produces two events, two campaign triggers and potentially two push notifications to a customer who bought once.
Reconciles with the source
Actually broken
The Braze external user ID 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
A duplicate here is visible to your customer on their lock screen, twice, and the second one is the reason they turn push off permanently. This is a more expensive mistake than a double-counted conversion in an ad platform, because the damage is not recoverable.
Nobody has reconciled it
Sanity → Braze · diagnose
Diagnostic order — Sanity → Braze
- 01
Count conversions carrying the Braze external user ID
- 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
Send a test purchase and read the user profile's event stream
One event or two? Check whether the SDK is already sending the same event before adding a server source, and check that the external ID matches the signed-in user rather than creating a new profile.
- 05
Read the match rate, not the success message
Braze shows events on the user profile within moments. Check the profile, not the API response, and specifically check whether an anonymous device profile has been created alongside the real one.
Sanity → Braze · prove
How it gets proven — Sanity → Braze
Source of truth
Your commerce, CRM or billing system — Sanity has no orders and no customers.
- The Braze external user ID confirmed present on a live conversion.
- The user profile confirmed to show one event per conversion, with device and user profiles correctly merged.
- The conversion confirmed sourced from the commerce system, with front-end routing verified separately.
Sanity → Braze · free audit
What we check in the free audit
- Count conversions carrying the Braze external user ID
- Follow one real conversion end to end
- Identify the front-end framework, not the CMS
- Send a test purchase and read the user profile's event stream
- 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 → Braze · when not to buy
When you don't need this — Sanity → Braze
- Measure identifier coverage yourself first — pull your last hundred conversions and count how many carry the Braze external user ID.
- 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 mobile app and no push channel, Braze is a large piece of infrastructure for a job an email platform already does.
Sanity → Braze · what we deliver
What gets built — Sanity → Braze
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 Braze
The Braze user track endpoint, posted server-side from your order or billing system with the external user ID and event properties.
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 → Braze questions, answered
Connected Content for small or highly personalized sends; a Catalog synced on publish when large sends would call Sanity once per recipient.
A Portable Text field was inserted without being serialized. Convert it to plain text or HTML before it reaches the message.
Almost always because the Braze external user ID 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.
Braze identifies people by an external_id you assign, usually your own user ID, with anonymous device profiles merged in once a user signs in. There is no click identifier at all. Getting the external ID right is the entire integration; getting it wrong fragments one customer into several profiles who each receive the same campaign.
Your commerce or CRM system. Send from wherever the money is recorded, not from the content layer.
Braze shows events on the user profile within moments. Check the profile, not the API response, and specifically check whether an anonymous device profile has been created alongside the real one.
More on Sanity → Braze
- Sanity → Google AdsConnecting Sanity to Google Ads
- Sanity → MetaConnecting Sanity to Meta Conversions API
- Sanity → GA4Connecting Sanity to GA4
RELATED GUIDES
Where Sanity → Braze fits in the rest of your tracking
- Umbraco → BrazeConnecting Umbraco to Braze
- AEM → BrazeConnecting Adobe Experience Manager to Braze
- Contentful → BrazeConnecting Contentful to Braze
- Sanity → KlaviyoConnecting Sanity to Klaviyo
- Sanity → AttentiveConnecting Sanity to Attentive
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Ghost → BrazeConnecting Ghost memberships to Braze
- Concrete CMS → BrazeConnecting Concrete CMS to Braze
Free · 30 min
Get Sanity and Braze joined properly
Free30 minutesNo obligation
