Connecting Craft CMS to The Trade Desk
Craft is a developer-oriented CMS, usually built bespoke by an agency, which means the implementation is whatever that agency decided and nothing is standard. The Trade Desk buys across the open internet rather than inside a walled garden, which means it cannot rely on a logged-in graph and has to work with identity you help it construct. The join between them succeeds or fails on one thing: whether Unified ID 2.0, derived from a hashed email reaches the Craft Commerce order before the conversion happens, because The Trade Desk can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Craft Commerce to The Trade Desk: UID2 from order emails
Every Craft Commerce order carries an email, guest checkout included. Upload completed orders to The Trade Desk from the order-complete listener or a nightly batch with the lowercased, trimmed and hashed email for UID2, plus order reference, value and currency. Split click-through from view-through, using discount codes to spot email-driven orders.
Every completed Craft Commerce order carries an email, guest checkout included, which is what The Trade Desk needs: a hashed email it can turn into UID2. Upload completed orders from the order-complete listener or a nightly batch with the normalized, hashed email, the order reference, value and currency. Anonymous browsing on the Craft site is invisible to this match no matter how it is tagged.
Your addressable share is the share of ad-exposed people who later gave you an email at checkout or login. Craft sites with a large content section, where most visitors read and never sign in, have a small authenticated share outside the checkout itself. A newsletter sign-up or account login is the only way to widen it, and visitors need a reason to give that email. Lowercase and trim before hashing; Craft keeps emails exactly as typed.
Split the reported conversions into click-through and view-through. A display campaign running while the brand's email list receives a sale announcement will claim view-through credit for orders the email drove, and Craft's discount code on each order is a quick way to spot that. Refunds recorded against Craft orders should be sent as adjustments if your setup supports it, or deducted in your own reconciliation.
Craft → The Trade Desk · what breaks
Why this join usually fails — Craft → The Trade Desk
- 01
Unified ID 2.0, derived from a hashed email never reaches Craft
Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.
- 02
Every install is bespoke
There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.
- 03
View-through conversions on the open internet
A large share of what a DSP claims is view-through: the person saw a display impression and later converted without clicking. Some of that is real influence and some of it is coincidence, and no post-click reporting can separate them. Treat the click-attributed number as the floor and prove the rest with a holdout.
- 04
Nothing reconciles afterwards
The Trade Desk reports match rates on uploaded conversions. Read the match rate — a low one means your authenticated share is the constraint, and no amount of pipeline work will change that.
Craft → The Trade Desk · the fix
What working looks like — Craft → The Trade Desk
Unified ID 2.0, derived from a hashed email on every order
Conversions arriving in The Trade Desk
The conversion is matched to an impression or click where identity resolves, and feeds the bidding models.
Reconciled against the source
Craft CMS's own records are the reference, not either dashboard.
Craft → The Trade Desk · architecture
How Craft and The Trade Desk actually connect
- 1
Craft CMS holds the truth
Craft installs are bespoke by nature. Establish how this particular build models a completed order before assuming anything transfers from another Craft site.
- 2
The Trade Desk needs a click to match
The Trade Desk needs the conversion with a UID2 or a hashed email it can resolve, plus the value and timestamp. Conversions from anonymous visitors cannot be matched at all.
- 3
The identifier is the bridge
Unified ID 2.0, derived from a hashed email, captured at the visit and carried into the Craft Commerce order.
- 4
The event source decides reliability
Fire from the event listener in PHP rather than a Twig template, which may be cached.
- 5
Deduplication at the destination
Deduplication is on your conversion identifier. Because open-internet buying frequently runs alongside search and social, the more consequential deduplication is across platforms rather than within this one.
Craft → The Trade Desk · normal or broken
Working vs. broken, side by side — Craft → The Trade Desk
Normal, not a fault
Unified ID 2.0, derived from a hashed email present on the order
Visible on the record itself in Craft CMS, not merely captured somewhere on the site.
Sent from the Craft Commerce order-complete event
Deduplicated correctly
Deduplication is on your conversion identifier. Because open-internet buying frequently runs alongside search and social, the more consequential deduplication is across platforms rather than within this one.
Reconciles with the source
The Trade Desk's count and Craft CMS's records agree within a few percent over a closed window.
Actually broken
Unified ID 2.0, derived from a hashed email missing on most records
Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.
Sent from the browser
There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.
Counted twice, or not at all
A large share of what a DSP claims is view-through: the person saw a display impression and later converted without clicking. Some of that is real influence and some of it is coincidence, and no post-click reporting can separate them. Treat the click-attributed number as the floor and prove the rest with a holdout.
Nobody has reconciled it
The dashboard shows a number and no one has compared it to Craft CMS.
Craft → The Trade Desk · diagnose
Diagnostic order — Craft → The Trade Desk
- 01
Count orders carrying Unified ID 2.0, derived from a hashed email
- 02
Follow one real conversion end to end
- 03
Read how this specific build handles order completion
Assumptions carried from another Craft project are the main source of wasted time here.
- 04
Split reported conversions into click-through and view-through
If the great majority are view-through, the honest next step is an incrementality test rather than a bid adjustment.
- 05
Read the match rate, not the success message
The Trade Desk reports match rates on uploaded conversions. Read the match rate — a low one means your authenticated share is the constraint, and no amount of pipeline work will change that.
Craft → The Trade Desk · prove
How it gets proven — Craft → The Trade Desk
Against Craft CMS's own records, not against either platform's dashboard.
Source of truth
Craft Commerce's order records in your own database, filtered to completed.
- Unified ID 2.0, derived from a hashed email confirmed present on a live order.
- Matched conversions reconciled against your own order records, with the click-through and view-through split stated.
- Order custom field confirmed populated on an order placed as an anonymous visitor through cache.
Craft → The Trade Desk · free audit
What we check in the free audit
- Count orders carrying Unified ID 2.0, derived from a hashed email
- Follow one real conversion end to end
- Read how this specific build handles order completion
- Split reported conversions into click-through and view-through
- Read the match rate, not the success message
Checked against
Craft Commerce's order records in your own database, filtered to completed.
Free30 minutesNo obligation
Craft → The Trade Desk · when not to buy
When you don't need this — Craft → The Trade Desk
- If The Trade Desk already reports conversions that reconcile against Craft CMS's records within a few percent, this join is working and there is nothing to buy.
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry Unified ID 2.0, derived from a hashed email.
- If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
- If you cannot collect email addresses from a meaningful share of your buyers, UID2 has little to work with and the open internet is not yet an addressable channel for you.
Craft → The Trade Desk · what we deliver
What gets built — Craft → The Trade Desk
Identifier capture into Craft
Capture the identifier and store it as a custom field on the order through a Craft event listener, server-side.
Event source: the Craft Commerce order-complete event
Fire from the event listener in PHP rather than a Twig template, which may be cached.
Dispatch to The Trade Desk
Server-side conversion upload with the hashed identity and value, from your order system.
Reversals where they exist
Refunds and cancelled orders are recorded against the order.
Written guarantee
95%+ tracking accuracy
Measured against Craft Commerce's order records in your own database, filtered to completed.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Craft → The Trade Desk questions, answered
Upload completed orders server-side with the normalized, hashed email or UID2, the order reference and value. Anonymous visitors cannot be matched.
Usually email formatting before hashing, or buyers whose emails do not resolve to UID2. Lowercase and trim before hashing and read the match rate on each upload.
Almost always because Unified ID 2.0, derived from a hashed email never reached the Craft Commerce order. Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look. Measure coverage before debugging the dispatch.
UID2 is built from a hashed and salted email address rather than from a cookie, which is the point: it is designed to survive third-party cookie deprecation. It also means the identifier only exists for people who gave you an email, so your addressable share is capped by your own authenticated traffic, not by the platform.
The Craft Commerce order-complete event. Fire from the event listener in PHP rather than a Twig template, which may be cached.
The Trade Desk reports match rates on uploaded conversions. Read the match rate — a low one means your authenticated share is the constraint, and no amount of pipeline work will change that.
More on Craft → The Trade Desk
- Concrete CMS → The Trade DeskConnecting Concrete CMS to The Trade Desk
- Craft → Google AdsConnecting Craft CMS to Google Ads
- Craft → MetaConnecting Craft CMS to Meta Conversions API
RELATED GUIDES
Where Craft → The Trade Desk fits in the rest of your tracking
- Duda → The Trade DeskConnecting Duda to The Trade Desk
- Contentful → The Trade DeskConnecting Contentful to The Trade Desk
- Umbraco → The Trade DeskConnecting Umbraco to The Trade Desk
- Craft → Instacart AdsConnecting Craft CMS to Instacart Ads
- Craft → LiveRampConnecting Craft CMS to LiveRamp
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Webflow → The Trade DeskConnecting Webflow to The Trade Desk
- Concrete CMS → The Trade DeskConnecting Concrete CMS to The Trade Desk
Free · 30 min
Get Craft and The Trade Desk joined properly
Free30 minutesNo obligation
