Connecting Magento to Snowflake
Magento is self-hosted and endlessly customisable, which means every installation is different and full-page caching is always in the way. 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 Magento order 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
Magento order tables in Snowflake, with click IDs kept on the order
Have the Magento observer save gclid, Meta click value, ttclid and UTMs to a custom table or order attribute, then replicate sales_order, items, addresses, credit memos and store tables into Snowflake. Use base_grand_total, convert created_at from UTC, count only one configurable row, keep a shared revenue-status view, and deduplicate on entity_id and updated_at.
Snowflake is where Magento's own records can be joined to ad spend and everything else, and that only works if the click identifiers are in the database. Have the order placement observer save gclid, the Meta click value, ttclid and UTM parameters to a custom table or order attribute so they replicate alongside sales_order. The warehouse can then attribute orders itself instead of copying each platform's claim.
Replicate sales_order, sales_order_item, sales_order_address, sales_creditmemo and the store and website tables from MySQL by change data capture or a scheduled extract. Use base_grand_total for revenue across currencies. Magento stores created_at in UTC while the admin shows the store's timezone, so convert before comparing a day against the admin report. Configurable products appear in sales_order_item as a parent row and a child row linked by parent_item_id; count only one or units double.
Put the revenue status filter in a shared view, processing and complete or whatever the business agrees, and subtract credit memos by order. Retried loads repeat rows, so deduplicate on entity_id and updated_at in a scheduled step. Store each gclid exactly as captured, because Google Ads offline uploads built from this table will reject a trimmed or re-encoded value.
Magento → Snowflake · what breaks
Why this join usually fails — Magento → Snowflake
- 01
Whatever join key both parties agree on, usually a hashed identifier 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
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.
- 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.
Magento → Snowflake · the fix
What working looks like — Magento → Snowflake
Whatever join key both parties agree on, usually a hashed identifier on every order
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
Magento → Snowflake · architecture
How Magento and Snowflake 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
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
The identifier is the bridge
Whatever join key both parties agree on, usually a hashed identifier, 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
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.
Magento → Snowflake · normal or broken
Working vs. broken, side by side — Magento → Snowflake
Normal, not a fault
Whatever join key both parties agree on, usually a hashed identifier present on the order
Sent from the Magento order placement observer
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
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
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
Magento → Snowflake · diagnose
Diagnostic order — Magento → Snowflake
- 01
Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- 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
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.
- 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.
Magento → Snowflake · prove
How it gets proven — Magento → Snowflake
Source of truth
Magento's sales order records in your own database, for the same window and order status set.
- Whatever join key both parties agree on, usually a hashed identifier confirmed present on a live order.
- Row counts and revenue reconciled against each source system for a closed window, with duplicates checked on the join key and both definitions documented.
- Order data confirmed populated on an order placed through a fully warmed cache.
Magento → Snowflake · free audit
What we check in the free audit
- Count orders carrying whatever join key both parties agree on, usually a hashed identifier
- Follow one real conversion end to end
- Place a test order as an anonymous visitor through cache
- Write down both parties' conversion definitions before writing any query
- 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 → Snowflake · when not to buy
When you don't need this — Magento → Snowflake
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry whatever join key both parties agree on, usually a hashed identifier.
- If your Magento build has heavy customisation by another team, scope their availability first — the build is usually blocked there.
- 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.
Magento → Snowflake · what we deliver
What gets built — Magento → Snowflake
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 Snowflake
Batch or streaming loads from your order system, with the raw event retained alongside anything you derive from it.
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 → Snowflake questions, answered
Replicate the order, item, address and credit memo tables from Magento's MySQL database with change data capture or a scheduled extract, and add click identifiers to the order through an observer so they come with it.
Usually timezone, status filter or currency: Magento stores timestamps in UTC, the admin shows store time, and order versus base amounts differ in multi-currency stores.
Almost always because whatever join key both parties agree on, usually a hashed identifier 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.
There is no vendor identifier. In a data share or clean room the key is negotiated: hashed email, order ID, a partner-supplied ID. Normalisation before hashing is the entire match rate, and a formatting difference between two organisations looks exactly like a poor-performing partnership.
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.
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.
More on Magento → Snowflake
- Magento → Google AdsConnecting Magento to Google Ads
- Magento → MetaConnecting Magento to Meta Conversions API
- Magento → GA4Connecting Magento to GA4
RELATED GUIDES
Where Magento → Snowflake fits in the rest of your tracking
- Braintree → SnowflakeConnecting Braintree to Snowflake
- WooCommerce → SnowflakeConnecting WooCommerce to Snowflake
- Gumroad → SnowflakeConnecting Gumroad to Snowflake
- Magento → BigQueryConnecting Magento to BigQuery
- Magento → SegmentConnecting Magento to Segment
- Jewelry ecommerceConversion tracking for jewelry ecommerce, measured in settled orders
- WooCommerce Subscriptions → SnowflakeConnecting WooCommerce Subscriptions to Snowflake
- nopCommerce → SnowflakeConnecting nopCommerce to Snowflake
Free · 30 min
Get Magento and Snowflake joined properly
Free30 minutesNo obligation
