Connecting Craft CMS to Awin
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. Awin is a traditional last-click affiliate network, and last-click is the whole problem: whoever touched the customer most recently takes the commission, which is a structural invitation for voucher-code sites to intercept sales you had already won. The join between them succeeds or fails on one thing: whether the Awin click reference, awc reaches the Craft Commerce order before the conversion happens, because Awin can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Craft Commerce to Awin: awc capture through a cached landing page
Capture awc in JavaScript into a first-party cookie, since cached Craft pages skip Twig logic, and copy it into an order custom field. Post the sale to Awin server-to-server from the order-complete listener with awc, order reference, commissionable amount, commission group and coupon code. Decline refunded or cancelled orders during the validation period.
Awin has ready-made plugins for the big ecommerce platforms; for Craft Commerce, check the plugin store but plan to build it. The awc value arrives on the landing URL, and on a statically cached Craft site any landing logic written in Twig or a PHP controller never runs for a cached hit. Capture awc in JavaScript into a first-party cookie, then copy it into an order custom field when the cart is created or updated.
Post the sale server-to-server from the order-complete listener with the awc, the order reference, the amount your programme terms say commission is due on (usually net of tax and shipping), and the commission group. Craft Commerce product types map naturally to commission groups if your programme pays differently by category. Include the coupon code from the order, which shows which sales came through a voucher site's code.
That coupon field is how you catch interception. Pull Awin-attributed orders whose awc came from a voucher publisher and compare the click time with the order completion time in Craft; a click minutes before completion on a cart that started from a paid ad is a sale you already had. Refunded and cancelled Craft orders must be declined or amended in Awin during the validation period, or the commission stands.
Craft → Awin · what breaks
Why this join usually fails — Craft → Awin
- 01
The Awin click reference, awc 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
Voucher-code publishers intercepting sales at the checkout
A customer arrives from a paid ad, reaches the basket, opens a new tab to search for a discount code, clicks a voucher site's link and returns to complete the order. Under last-click the voucher site earns the commission on a sale your advertising produced. This is not a fringe case; on many programmes it is the largest single publisher category.
- 04
Nothing reconciles afterwards
Awin's reporting shows the sale, the publisher and the commission group. Read the publisher type and the time between click and sale — a click seconds before the order tells you what happened.
Craft → Awin · the fix
What working looks like — Craft → Awin
The Awin click reference, awc on every order
Conversions arriving in Awin
The sale appears as pending, publishers see it in their reporting, and it validates after your approval period.
Reconciled against the source
Craft CMS's own records are the reference, not either dashboard.
Craft → Awin · architecture
How Craft and Awin 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
Awin needs a click to match
Awin needs the click reference, a unique order reference, the order value and the commission group. Missing the click reference means the sale is untracked and the publisher will query it.
- 3
The identifier is the bridge
The Awin click reference, awc, 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
Awin deduplicates on your order reference. It also supports a dedup flag so you can decline to commission sales that another channel already claimed — which is the feature most advertisers do not know exists and should be using.
Craft → Awin · normal or broken
Working vs. broken, side by side — Craft → Awin
Normal, not a fault
The Awin click reference, awc 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
Awin deduplicates on your order reference. It also supports a dedup flag so you can decline to commission sales that another channel already claimed — which is the feature most advertisers do not know exists and should be using.
Reconciles with the source
Awin's count and Craft CMS's records agree within a few percent over a closed window.
Actually broken
The Awin click reference, awc 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 customer arrives from a paid ad, reaches the basket, opens a new tab to search for a discount code, clicks a voucher site's link and returns to complete the order. Under last-click the voucher site earns the commission on a sale your advertising produced. This is not a fringe case; on many programmes it is the largest single publisher category.
Nobody has reconciled it
The dashboard shows a number and no one has compared it to Craft CMS.
Craft → Awin · diagnose
Diagnostic order — Craft → Awin
- 01
Count orders carrying the Awin click reference, awc
- 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
Segment publishers by type and check where the click happened in the journey
Voucher and cashback clicks that occur within seconds of an order are interception, not acquisition. Use the deduplication flag rather than paying for both.
- 05
Read the match rate, not the success message
Awin's reporting shows the sale, the publisher and the commission group. Read the publisher type and the time between click and sale — a click seconds before the order tells you what happened.
Craft → Awin · prove
How it gets proven — Craft → Awin
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.
- The Awin click reference, awc confirmed present on a live order.
- Validated sales reconciled per order reference against your own records, with voucher-sourced sales identified and the paid-media overlap stated.
- Order custom field confirmed populated on an order placed as an anonymous visitor through cache.
Craft → Awin · free audit
What we check in the free audit
- Count orders carrying the Awin click reference, awc
- Follow one real conversion end to end
- Read how this specific build handles order completion
- Segment publishers by type and check where the click happened in the journey
- 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 → Awin · when not to buy
When you don't need this — Craft → Awin
- If Awin 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 the Awin click reference, awc.
- If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
- If you run no affiliate programme this is irrelevant. If you do, the commission structure by publisher type will change your economics more than the tracking accuracy will.
Craft → Awin · what we deliver
What gets built — Craft → Awin
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 Awin
Server-to-server conversion posting from your order system, or the tracking pixel where server posting is not available.
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 → Awin questions, answered
Check the Craft plugin store and Awin's own integration list, but plan for a custom build: capture awc on landing, store it on the order, and post the sale server-side on completion.
Usually the awc never reached the order, because landing logic ran in a cached template or the cookie was not copied onto the cart. Open a recent order and check the custom field.
Almost always because the Awin click reference, awc 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.
Awin sets the awc parameter on the landing URL and stores it in a cookie for the attribution window. Because attribution is last-click, that cookie being overwritten late in the journey transfers the commission — which is exactly what a voucher-code extension does at the checkout page.
The Craft Commerce order-complete event. Fire from the event listener in PHP rather than a Twig template, which may be cached.
Awin's reporting shows the sale, the publisher and the commission group. Read the publisher type and the time between click and sale — a click seconds before the order tells you what happened.
More on Craft → Awin
- Craft → Google AdsConnecting Craft CMS to Google Ads
- Craft → MetaConnecting Craft CMS to Meta Conversions API
- Craft → GA4Connecting Craft CMS to GA4
RELATED GUIDES
Where Craft → Awin fits in the rest of your tracking
- Umbraco → AwinConnecting Umbraco to Awin
- Sitecore → AwinConnecting Sitecore to Awin
- Duda → AwinConnecting Duda to Awin
- Craft → PartnerStackConnecting Craft CMS to PartnerStack
- Craft → ImpactConnecting Craft CMS to Impact.com
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Contentful → AwinConnecting Contentful to Awin
- Ghost → AwinConnecting Ghost memberships to Awin
Free · 30 min
Get Craft and Awin joined properly
Free30 minutesNo obligation
