Connecting Medusa to Awin
Medusa is a Node commerce engine you extend in your own codebase, which makes the conversion event a piece of application code — and therefore something that can be tested rather than hoped for. 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 Medusa 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
Medusa orders to Awin with the awc in cart metadata
Store the awc from the landing URL in a cookie and cart metadata, then post the sale from a payment-capture subscriber with the display ID as order reference and captured amount. Split line items across commission groups, include promotion codes, and use Medusa refund and return events to amend or decline transactions before validation closes.
Awin needs the awc click reference on every affiliate sale, and in a Medusa build the reliable place for it is cart metadata. Read awc from the landing URL in the storefront, store it in a first-party cookie, and write it into the cart when the cart is created. At payment capture your subscriber posts the sale with the awc, the order's display ID as the order reference, and the captured amount.
Medusa's line items let you do what most hosted checkouts cannot: split the order across commission groups by product type or collection, so a sale mixing full-price and clearance items pays the correct commission on each part. Send the order value net of shipping and tax if your publisher terms say so, and send any promotion code applied to the cart, since voucher-code publishers expect their code to be visible on the transaction.
Refunds and returns are your side of the bargain. Medusa emits its own events when a refund is issued or a return is received; use them to queue an amendment or decline of the Awin transaction before the validation period closes. A weekly reconciliation of refunded Medusa orders against pending Awin transactions catches the cases where a partial refund was processed but the transaction value was never reduced.
Medusa → Awin · what breaks
Why this join usually fails — Medusa → Awin
- 01
The Awin click reference, awc never reaches Medusa
The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.
- 02
Firing on order placed rather than payment captured
They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.
- 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.
Medusa → Awin · the fix
What working looks like — Medusa → 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
Medusa → Awin · architecture
How Medusa and Awin actually connect
- 1
Medusa holds the truth
Because you own the event handlers, the conversion can fire from the payment-captured event specifically rather than from whatever the frontend happened to render.
- 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 Medusa order.
- 4
The event source decides reliability
Send orders at payment capture, at the paid total.
- 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.
Medusa → Awin · normal or broken
Working vs. broken, side by side — Medusa → Awin
Normal, not a fault
The Awin click reference, awc present on the order
Sent from a Medusa subscriber on order payment capture
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
Actually broken
The Awin click reference, awc missing on most records
The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created.
Sent from the browser
They are different events and the gap between them contains every failed and pending payment. Order-placed is the easier hook and the wrong one.
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
Medusa → Awin · diagnose
Diagnostic order — Medusa → Awin
- 01
Count orders carrying the Awin click reference, awc
- 02
Follow one real conversion end to end
- 03
Check which event your subscriber listens to
One line of code, and it decides whether you are counting orders or counting money.
- 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.
Medusa → Awin · prove
How it gets proven — Medusa → Awin
Source of truth
Medusa orders by payment status, emitted from your own subscriber code.
- 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.
- Payment-captured orders reconciled against imported conversions.
Medusa → 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
- Check which event your subscriber listens to
- Segment publishers by type and check where the click happened in the journey
- Read the match rate, not the success message
Checked against
Medusa orders by payment status, emitted from your own subscriber code.
Free30 minutesNo obligation
Medusa → Awin · when not to buy
When you don't need this — Medusa → Awin
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Awin click reference, awc.
- If every payment method you accept is instant, the two events nearly coincide and the distinction costs more than it returns.
- 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.
Medusa → Awin · what we deliver
What gets built — Medusa → Awin
Identifier capture into Medusa
Write the identifier into cart metadata at first touch so it is carried onto the order automatically at completion.
Event source: a Medusa subscriber on order payment capture
Send orders at payment capture, at the paid total.
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 emit their own event and should reverse.
Written guarantee
95%+ tracking accuracy
Measured against Medusa orders by payment status, emitted from your own subscriber code.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Medusa → Awin questions, answered
In a first-party cookie set on landing and in cart metadata, so it reaches the order automatically when the cart completes.
Use Medusa's refund and return events to amend or decline the Awin transaction during its validation period, matched by the order's display ID.
Almost always because the Awin click reference, awc never reached the Medusa order. The storefront is separate from the backend, and the identifier must be attached to the cart before the order is created. 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.
A Medusa subscriber on order payment capture. Send orders at payment capture, at the paid total.
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 Medusa → Awin
- Stripe → AwinConnecting Stripe to Awin
- PayPal → AwinConnecting PayPal to Awin
- Shopify → AwinConnecting Shopify to Awin
RELATED GUIDES
Where Medusa → Awin fits in the rest of your tracking
- Squarespace → AwinConnecting Squarespace Commerce to Awin
- Braintree → AwinConnecting Braintree to Awin
- Checkout Extensibility → AwinConnecting Shopify Checkout Extensibility to Awin
- Medusa → PartnerStackConnecting Medusa to PartnerStack
- Medusa → ImpactConnecting Medusa to Impact.com
- FashionConversion tracking for fashion brands, reported net of returns
- OpenCart → AwinConnecting OpenCart to Awin
- nopCommerce → AwinConnecting nopCommerce to Awin
Free · 30 min
Get Medusa and Awin joined properly
Free30 minutesNo obligation
