Connecting Magento to Branch
Magento is self-hosted and endlessly customisable, which means every installation is different and full-page caching is always in the way. Branch's real job is the web-to-app seam — a person clicks a link in a browser, installs the app, and something has to carry the context across an install that destroys every cookie involved. The join between them succeeds or fails on one thing: whether the Branch link click identifier and the deferred deep link payload reaches the Magento order before the conversion happens, because Branch can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Magento to Branch: deep link to products, not URL paths
Map Branch deep links to Magento SKU or product ID, not URL keys that change on rename. For conversions, the app passes Branch's identity context through GraphQL at checkout, the placement observer stores it, and your server posts the purchase to Branch's server-to-server API with the increment ID and subtotal after discounts. Keep web orders and unpaired SDK duplicates out.
For a Magento merchant with a native app, Branch earns its fee on product links: a paid social ad for one SKU should open that product in the app if installed, or carry it through the install if not. Magento URLs are built from URL keys and rewrites that change when merchandisers rename products, so a deep link mapped to a URL path breaks silently. Map links to SKU or product ID and let the app resolve the current page.
For conversions, the app passes Branch's identity context to Magento at checkout through the GraphQL API, the placement observer stores it as order data, and your server posts the purchase to Branch's server-to-server events API with the order increment ID as event identifier. Fire from the SDK or from the server, not both unpaired: Branch forwards purchases to downstream ad partners and the duplicate travels with them.
Keep web orders out of Branch unless they began from a Branch link on mobile web and you measure that journey on purpose; otherwise Branch reports revenue the app never produced. Send revenue as subtotal after discounts in the order currency, and push refunds from credit memos if partners rely on Branch revenue. The cache issue is limited to Branch's web banner: make sure it loads by JavaScript rather than being printed into cached HTML.
Magento → Branch · what breaks
Why this join usually fails — Magento → Branch
- 01
The Branch link click identifier and the deferred deep link payload never reaches Magento
Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.
- 02
Full-page cache between the visitor and your code
The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.
- 03
The install that erases the campaign
Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.
- 04
Nothing reconciles afterwards
Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.
Magento → Branch · the fix
What working looks like — Magento → Branch
The Branch link click identifier and the deferred deep link payload on every order
Conversions arriving in Branch
The event is attributed to the originating link and campaign, and forwarded to any configured downstream partners.
Reconciled against the source
Magento → Branch · architecture
How Magento and Branch actually connect
- 1
Magento holds the truth
You own the database, so the truth is as good as the query. Pin down which order statuses count as revenue — processing, complete, or both — because that choice moves the number substantially.
- 2
Branch needs a click to match
Branch needs the link click context matched to the app open, plus the event and its revenue. Without the deferred deep link payload there is nothing to join the install to.
- 3
The identifier is the bridge
The Branch link click identifier and the deferred deep link payload, captured at the visit and carried into the Magento order.
- 4
The event source decides reliability
Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
- 5
Deduplication at the destination
Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.
Magento → Branch · normal or broken
Working vs. broken, side by side — Magento → Branch
Normal, not a fault
The Branch link click identifier and the deferred deep link payload present on the order
Sent from the Magento order placement observer
Deduplicated correctly
Branch deduplicates on the event identifier you supply. Firing a purchase from both the SDK and your server without a shared identifier double-counts, and Branch forwards to downstream partners, so the duplicate propagates.
Reconciles with the source
Actually broken
The Branch link click identifier and the deferred deep link payload missing on most records
Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.
Sent from the browser
The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.
Counted twice, or not at all
Someone clicks a paid ad on the mobile web, hits the app store, installs, and opens the app as a brand new anonymous user. Without deferred deep linking that campaign produced an organic install, and the ad account shows nothing for a conversion it genuinely caused.
Nobody has reconciled it
Magento → Branch · diagnose
Diagnostic order — Magento → Branch
- 01
Count orders carrying the Branch link click identifier and the deferred deep link payload
- 02
Follow one real conversion end to end
- 03
Place a test order as an anonymous visitor through cache
Not as an admin, which bypasses it. If the order data is missing on the cached path, caching is your cause.
- 04
Measure your organic install share and ask whether it is plausible
An implausibly large organic share is usually broken attribution rather than genuine word of mouth.
- 05
Read the match rate, not the success message
Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.
Magento → Branch · prove
How it gets proven — Magento → Branch
Source of truth
Magento's sales order records in your own database, for the same window and order status set.
- The Branch link click identifier and the deferred deep link payload confirmed present on a live order.
- Attributed installs and in-app purchases reconciled against your own user records, with the unattributed share stated.
- Order data confirmed populated on an order placed through a fully warmed cache.
Magento → Branch · free audit
What we check in the free audit
- Count orders carrying the Branch link click identifier and the deferred deep link payload
- Follow one real conversion end to end
- Place a test order as an anonymous visitor through cache
- Measure your organic install share and ask whether it is plausible
- Read the match rate, not the success message
Checked against
Magento's sales order records in your own database, for the same window and order status set.
Free30 minutesNo obligation
Magento → Branch · when not to buy
When you don't need this — Magento → Branch
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Branch link click identifier and the deferred deep link payload.
- If your Magento build has heavy customisation by another team, scope their availability first — the build is usually blocked there.
- If you have no app, or no web surface driving app installs, there is no seam here to bridge and the integration solves nothing.
Magento → Branch · what we deliver
What gets built — Magento → Branch
Identifier capture into Magento
Capture the identifier and persist it as order data through an observer on order placement, server-side, so it never depends on what the cache served.
Event source: the Magento order placement observer
Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
Dispatch to Branch
The Branch server-to-server events API, posted from your backend with the user identity and event data.
Reversals where they exist
Credit memos are recorded against the original order and should reduce the reported figure.
Written guarantee
95%+ tracking accuracy
Measured against Magento's sales order records in your own database, for the same window and order status set.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Magento → Branch questions, answered
They probably point at URL paths that changed when products were renamed. Link by SKU or product ID and resolve the page inside the app.
Only those that came from a Branch link you are measuring; sending every web order credits the app with revenue it did not drive.
Almost always because the Branch link click identifier and the deferred deep link payload never reached the Magento order. Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one. Measure coverage before debugging the dispatch.
Branch stores the click context and replays it into the app on first open, which is how a marketing campaign survives an install. That handoff is probabilistic on iOS and increasingly constrained, so the deep link data can arrive incomplete or not at all — and when it does not, the user looks organic.
The Magento order placement observer. Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.
Branch shows the attributed link and campaign on the event in its dashboard. Check that the install carries a link click rather than showing as organic, which is the failure this product exists to prevent.
More on Magento → Branch
- Magento → Google AdsConnecting Magento to Google Ads
- Magento → MetaConnecting Magento to Meta Conversions API
- Magento → GA4Connecting Magento to GA4
RELATED GUIDES
Where Magento → Branch fits in the rest of your tracking
- OpenCart → BranchConnecting OpenCart to Branch
- WooCommerce Subscriptions → BranchConnecting WooCommerce Subscriptions to Branch
- nopCommerce → BranchConnecting nopCommerce to Branch
- Magento → AppsFlyerConnecting Magento to AppsFlyer
- Furniture ecommerceConversion tracking for furniture ecommerce, measured after delivery
- PrestaShop → BranchConnecting PrestaShop to Branch
- Saleor → BranchConnecting Saleor to Branch
- Gumroad → BranchConnecting Gumroad to Branch
Free · 30 min
Get Magento and Branch joined properly
Free30 minutesNo obligation
