Skip to main content
Statamic → AwinIntegration guide

Connecting Statamic to Awin

Statamic is a flat-file CMS on Laravel, usually chosen by agencies for content sites where commerce is bolted on rather than central. 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 Statamic or Laravel order record 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

Statamic commerce to Awin: capture awc where PHP never runs

Capture Awin's awc in the browser with MasterTag or a first-party cookie script, since Laravel middleware never runs on statically cached pages, then store it on the order row. Post server-to-server from the Laravel order event with the awc, a unique order reference and commission group. Exclude the confirmation page from caching, and send refunds within the validation period.

On a Statamic store, the order lives in your Laravel app or a commerce addon, and Awin's server-to-server post belongs on that order event with the awc, a unique order reference and the commission group. The capture is the hard part: Laravel middleware that reads awc from the landing URL never runs on a fully static-cached page, so the click reference is silently dropped for most visitors.

Capture awc in the browser with Awin's MasterTag or a small script that writes a first-party cookie, then read that cookie in Laravel when the order is created and store it on the order row. Check how your static cache treats query strings, because a cached copy per query string variant can fill the cache with one file per Awin click.

The confirmation page is the second trap. If it is static-cached, a template-rendered Awin conversion tag serves the first buyer's order reference to every later buyer, Awin deduplicates on that reference, and real sales vanish. Exclude the confirmation route from the cache, fire the conversion server-side from the order event, and send refunds and cancellations during the validation period so publishers are not commissioned on returned orders.

Statamic → Awin · what breaks

Why this join usually fails — Statamic → Awin

  1. 01

    The Awin click reference, awc never reaches Statamic

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  2. 02

    Static caching bypassing PHP entirely

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  3. 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.

  4. 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.

Statamic → Awin · the fix

What working looks like — Statamic → 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

Statamic → Awin · architecture

How Statamic and Awin actually connect

  1. 1

    Statamic holds the truth

    Because Statamic sits on Laravel, the commercial record is usually a database table your developers defined. That is the source of truth and it is fully under your control.

  2. 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. 3

    The identifier is the bridge

    The Awin click reference, awc, captured at the visit and carried into the Statamic or Laravel order record.

  4. 4

    The event source decides reliability

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  5. 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.

Statamic → Awin · normal or broken

Working vs. broken, side by side — Statamic → Awin

Normal, not a fault

  • The Awin click reference, awc present on the order

  • Sent from your Laravel application's order 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

Actually broken

  • The Awin click reference, awc missing on most records

    Statamic's static caching serves pre-rendered files with no PHP execution at all, which means anything expecting server-side rendering per request simply does not run.

  • Sent from the browser

    Statamic's full static caching serves a file from disk. No PHP runs, so nothing dynamic happens — and this is invisible because the page looks perfect.

  • 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

Statamic → Awin · diagnose

Diagnostic order — Statamic → Awin

  1. 01

    Count orders carrying the Awin click reference, awc

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether full static caching is enabled

    If it is, any per-request logic in a template is not running and never was.

  4. 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.

  5. 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.

Statamic → Awin · prove

How it gets proven — Statamic → Awin

Source of truth

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

  • 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 data confirmed persisted on a purchase made while full static caching was active.

Statamic → 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 whether full static caching is enabled
  • Segment publishers by type and check where the click happened in the journey
  • Read the match rate, not the success message

Checked against

Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.

Get my free conversion tracking audit

Free30 minutesNo obligation

Statamic → Awin · when not to buy

When you don't need this — Statamic → Awin

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the Awin click reference, awc.
  • If commerce lives in a separate system entirely, work there — Statamic is the content layer.
  • 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.

Statamic → Awin · what we deliver

What gets built — Statamic → Awin

  • Identifier capture into Statamic

    Capture the identifier and persist it through a Laravel event listener into your own order table, entirely outside the static cache path.

  • Event source: your Laravel application's order event

    Fire from the application event. Static caching means the template that rendered the page may never have executed anything.

  • 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

    Whatever your application defines as a refund.

Written guarantee

95%+ tracking accuracy

Measured against Whatever your Laravel application persists — Statamic's flat files hold content, not transactions.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Statamic → Awin questions, answered

Usually awc is read by server code that does not run on statically cached landing pages. Capture it in the browser into a first-party cookie and read it at order creation.

Free · 30 min

Get Statamic and Awin joined properly

Free30 minutesNo obligation