Skip to main content
Statamic → BrazeIntegration guide

Connecting Statamic to Braze

Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. 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 Statamic or Laravel order 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

Statamic users to Braze: an external ID that survives migration

Choose a Braze external_id you control, such as your own customer UUID, rather than the Statamic user ID, which changes if users migrate from flat files to a database. Send sign-ups and purchases from Laravel listeners with it, call changeUser at login, and read the ID from a nocache region, since cached pages would hand one member's ID to everyone.

Braze resolves to an external_id, and on a Statamic site with member accounts the obvious choice is the Statamic user ID. That works until someone moves users from flat files to the database, which Statamic supports and which large member sites eventually do. If the migration does not preserve IDs, every member gets a new one, and Braze ends up with two profiles per person, each receiving campaigns.

Decide the external_id before launch and make it something you control and never change, such as your own customer UUID stored on the user, rather than whatever storage layer currently generates. Send sign-ups and purchases from Laravel listeners with that ID, and call changeUser in the Braze web SDK at login so anonymous browsing merges into the same profile.

Static caching adds one more trap: a page that prints the logged-in user's ID into a script for the Braze SDK will, when fully cached, hand one member's ID to every visitor, merging strangers into one profile. Read the ID from a nocache region or an authenticated endpoint after load. Content-only Statamic sites without logins should send only form sign-ups, keyed on email-derived IDs.

Statamic → Braze · what breaks

Why this join usually fails — Statamic → Braze

  1. 01

    The Braze external user ID never reaches Statamic

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  2. 02

    Static caching bypassing PHP entirely

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  3. 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.

  4. 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.

Statamic → Braze · the fix

What working looks like — Statamic → Braze

  • The Braze external user ID on every order

  • 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

Statamic → Braze · architecture

How Statamic and Braze actually connect

  1. 1

    Statamic holds the truth

    Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.

  2. 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. 3

    The identifier is the bridge

    The Braze external user ID, captured at the visit and carried into the Statamic or Laravel order record.

  4. 4

    The event source decides reliability

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  5. 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.

Statamic → Braze · normal or broken

Working vs. broken, side by side — Statamic → Braze

Normal, not a fault

  • The Braze external user ID present on the order

  • Sent from your Laravel application's order event

  • 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

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  • Sent from the browser

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  • 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

Statamic → Braze · diagnose

Diagnostic order — Statamic → Braze

  1. 01

    Count orders carrying the Braze external user ID

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether full static caching is enabled

    If it is, any per-request logic in a template is not running and never was.

  4. 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.

  5. 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.

Statamic → Braze · prove

How it gets proven — Statamic → Braze

Source of truth

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

  • The Braze external user ID confirmed present on a live order.
  • The user profile confirmed to show one event per conversion, with device and user profiles correctly merged.
  • Order data confirmed persisted on a purchase made while full static caching was active.

Statamic → Braze · free audit

What we check in the free audit

  • Count orders carrying the Braze external user ID
  • Follow one real conversion end to end
  • Check whether full static caching is enabled
  • Send a test purchase and read the user profile's event stream
  • Read the match rate, not the success message

Checked against

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Statamic → Braze · when not to buy

When you don't need this — Statamic → Braze

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Braze external user ID.
  • If commerce lives in a separate system entirely, work there — Statamic is the content layer.
  • 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.

Statamic → Braze · what we deliver

What gets built — Statamic → Braze

  • Identifier capture into Statamic

    Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.

  • Event source: your Laravel application's order event

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  • 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

    Whatever your application defines as a refund.

Written guarantee

95%+ tracking accuracy

Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Statamic → Braze questions, answered

A customer ID you control that never changes, stored on the Statamic user, not an ID generated by the current storage driver.

Free · 30 min

Get Statamic and Braze joined properly

Free30 minutesNo obligation