The setup takes about five minutes. You need an active PixelYourSite PRO license and your Awin Advertiser ID.
- Remove duplicate tracking. If the official “Awin – Advertiser Tracking for WooCommerce” plugin, a GTM Awin tag or a theme snippet already reports sales, remove it. Two integrations count every sale twice.
- Add the Advertiser ID. Get it from Awin first: log in at ui.awin.com, go to Account > Profile > Overview, and copy the number shown under your logo, next to your programme name (Awin also calls it MID or Merchant ID). It is the same number as in your MasterTag address,
https://www.dwin1.com/<Advertiser ID>.js. Then, on the PixelYourSite main settings page where the other pixel IDs are, open Your Awin Tag, turn on Enable Pixel and paste it into Awin Advertiser ID. Only digits are accepted; one ID per site. - Choose the consent mode. Leave Load Awin before consent off unless your legal advisor approves Awin’s own consent model (see Consent).
- Check the Sale is on (it is by default). In the WooCommerce tab, open the Purchase event section: under Track Purchases, the switch Enable the Sale conversion on Awin is ON by default. The EDD tab has the same switch in its Purchase section, also ON by default. Track Purchases itself must stay on, as it is by default.
- Set the store options. In the WooCommerce tab (or the EDD tab), go to the ID settings area — next to the Facebook ID settings and Google Tags ID settings cards — and open the Awin settings card. It appears only after Awin is enabled in step 2. Set the commission group code, coupons, new/returning customer, Product Level Tracking and the product ID that matches your Awin feed.
- Test. Run a test transaction from Awin’s Tracking Diagnosis (see Testing).
How it works
PixelYourSite keeps the Awin click on your server from the moment the visitor lands, then reports the order on the thank-you page through two independent channels: Awin’s MasterTag with the Conversion Tag, and the fallback image pixel. Awin de-duplicates them by order reference.
- Landing. A visitor clicks a publisher’s Awin link. Awin redirects to your site with
awc=<click id>andsource=aw(plussnfor cashback publishers). PixelYourSite stores the click in a first-party cookie set by the server (awc, orawc_snfor cashback), HttpOnly, 365 days — a normal click only with consent, a cashback click always — and recordsawin_source=aw. - Browsing. The MasterTag (
https://www.dwin1.com/<Advertiser ID>.js) loads on every page except checkout and order-pay, once consent allows it. - Checkout. When the order is created, the click is saved on the order (
_pys_awin_clickmeta), so it survives a lost cookie. - Thank-you page. PixelYourSite computes the sale once, saves it on the order (
_pys_awin_conversionmeta), and outputs: the Conversion Tag (AWIN.Tracking.Sale), declared before the MasterTag loads; the Product Level Tracking basket form; and the fallback pixelhttps://www.awin1.com/sread.img. - Once per order. After the tags are printed, the order is marked as sent; a reload of the thank-you page does not report it again.
What is supported
PixelYourSite PRO tracks one Awin event: the Sale, on WooCommerce and Easy Digital Downloads orders. Nothing else is sent to Awin.
| Area | Supported | Notes |
|---|---|---|
| WooCommerce orders | Yes | Sale fires on the order-received (thank-you) page. Classic and block checkout. |
| Easy Digital Downloads | Yes, EDD 3.x only | Uses the EDD 3 order API (edd_get_order). EDD 2.x is not supported. |
| Product Level Tracking (PLT) | Yes | Basket form for the MasterTag + bd[] lines on the fallback pixel. |
| Voucher codes | Yes | First coupon in voucher; extra coupons in custom parameter 2. |
| New / returning customer | Yes | customerAcquisition = NEW or RETURNING. |
| Custom events, automatic events, form events | No | Awin::generateEvents() handles only woo_purchase and edd_purchase. |
| Lead tracking (sign-ups, forms) | No | No lead conversion is sent. |
| Server-to-server (Awin Conversion API or S2S) | No | All tracking is client-side: the MasterTag, the Conversion Tag and the fallback image pixel. |
| Several Awin programmes on one site | One per page | One Advertiser ID per request; a developer filter can switch it by language, domain or currency. |
| Refunds and cancellations | No | Transactions are approved or declined in the Awin dashboard, not by the plugin. |
If the official Awin – Advertiser Tracking for WooCommerce plugin is active too, PixelYourSite shows a warning: both would report the same sale. Deactivate one of them.
Where to find your Awin data
You need only your Advertiser ID to start; everything else is optional or set up by Awin. Menu paths are from Awin’s help centre and can differ between the new Awin platform and Awin Classic.
| What | Where in Awin | Used in PixelYourSite | Required |
|---|---|---|---|
| Advertiser ID (MID, Merchant ID) | Account > Profile > Overview — under your logo, next to the programme name | General > Awin tag > Awin Advertiser ID | Yes |
| Commission group codes | Commission > Rules > Commission Manager > Commission Groups tab (Awin Classic). Every programme has a mandatory default group. The code cannot be edited after the group is created. | WooCommerce / EDD > Awin settings > Commission group | No (default DEFAULT) |
| Test transaction | Support > Integration > Tracking Diagnosis > Create a test transaction | Used to verify the setup (see Testing) | Recommended |
| Product feed IDs | Your product feed as submitted to Awin | The PLT “ID” setting must produce the same IDs | Only with PLT |
| Custom parameters | Reported per transaction; using them in commission conditions needs an Advanced plan | Sent automatically: p1 = PixelYourSite <version>, p2 = extra coupon codes | No |
Landing-URL appends (source, UTM, incentive flag) | Set by Awin staff on request — contact your Integration Analyst (integrating) or post-live support (live) | Read by “Read the channel from the source URL parameter” | No |
| Transaction validation | Commissions > Review commission payments (new platform) | Not handled by the plugin — approve or decline here | Ongoing |
| Conversion API key | API Credentials in the user menu (top right), or ui.awin.com/awin-api; advertiser APIs need an Accelerate or Advanced plan | Not used — PixelYourSite has no server-to-server sending | No |
Awin’s standard click redirect already adds awc (the click ID) and source (returns aw for an Awin click) to the landing URL, so the defaults in PixelYourSite work without extra setup.
Settings reference
All options with their defaults. WooCommerce and EDD have separate copies of the store options.
| Setting | Where | Default | What it does |
|---|---|---|---|
| Enable Pixel | Your Awin Tag | On | Master switch for Awin. |
| Awin Advertiser ID | Your Awin Tag | Empty | Numeric MID, 1–12 digits. Invalid values are dropped; without an ID nothing runs. |
| Test mode | Your Awin Tag | Off | Sends test=1 / testmode=1. Awin does not process these sales. Leave off for Tracking Diagnosis tests and in production. |
| Default channel | Your Awin Tag | aw | Channel sent when no source is stored. Lower-case letters, digits, _ and -, max 50. |
| Read the channel from the “source” URL parameter | Your Awin Tag | On | Stores ?source= from the landing URL (30 days) and sends it as the channel. An Awin click always stores aw. |
| Load Awin before consent | Your Awin Tag | Off | Off: Awin waits for consent. On: Awin’s own consent model. See Consent. |
| Enable the Sale conversion on Awin | WooCommerce / EDD tab, Purchase event | On | Reports orders from that store. |
| Send coupon codes | Awin settings | On | First coupon as voucher; the rest in custom parameter 2. |
| Send new/returning customer | Awin settings | On | customerAcquisition = NEW / RETURNING. |
| Commission group | Awin settings | DEFAULT | Code the whole sale is booked to. Upper-cased; letters, digits, _ . -, max 50. |
| Enable Product Level Tracking | Awin settings | On | Sends each order line to Awin. |
| ID (product ID source) | Awin settings | Product ID (Woo), Download ID (EDD) | Woo: Product ID, SKU or a custom field. EDD: Download ID or SKU. A missing SKU or field falls back to the ID. |
| ID prefix / suffix | Awin settings | Empty | Added around the PLT product ID. |
| Treat variable products like simple products | Awin settings | Off | Sends the parent ID instead of the variation ID. |
| WPML Unified ID logic / language | Awin settings (Woo, WPML active) | Off | Uses the default-language product ID for translations. |
| Awin consent category | Consent tab, Cookiebot | marketing | Cookiebot category that gates Awin. |
What is sent to Awin
The sale is computed once (AwinConversion::build()), saved on the order, and sent identically by the Conversion Tag and the fallback pixel.
Conversion Tag (AWIN.Tracking.Sale) | Fallback pixel | Value | Awin’s rule |
|---|---|---|---|
| — | tt=ns, tv=2, merchant | Fixed; merchant = Advertiser ID | As documented |
amount | amount | Order lines after discounts, before tax; shipping, tax and positive fees excluded; negative fees subtracted; never below 0; 2 decimals with a dot | Subtotal after discounts, excluding tax, shipping and service charges |
parts | parts | <commission group>:<amount>, one group for the whole order | Group code and amount; parts add up to amount |
orderRef | ref | WooCommerce order number / EDD order number, max 50 characters, URL-encoded | Unique per transaction, URL-encoded, 50 characters recommended |
currency | cr | The order’s currency (ISO 4217) | One currency per transaction |
voucher | vc | First coupon code, URL-encoded; empty when none or when coupons are off | Return the parameter even if empty |
channel | ch | See De-duplication | aw for Awin-referred sales |
test | testmode | 0, or 1 in Test mode | 1 = not processed |
customerAcquisition | customeracquisition | NEW / RETURNING; left out when unknown or switched off | NEW or RETURNING |
custom | p1, p2 | p1 = PixelYourSite <version>; p2 = the other coupon codes, comma-separated | URL-encoded; up to 255 per transaction |
AdvertiserConsent | cons | 1 with consent, 0 without | Required with Awin’s consent framework |
click | cks | Awin click IDs: the cashback click always, the normal click only with consent; the click saved on the order first, then cookies; comma-separated | awc only with consent, awc_sn always |
Basket form aw_basket | bd[0], bd[1]… | One line per order item (PLT) | Pipe-separated AW:P format |
New or returning customer. WooCommerce: NEW when the same customer account (guests: billing email) has no other completed, processing or on-hold order in the last 540 days. EDD: NEW when the EDD customer has no other payment in the last 540 days.
Product Level Tracking line. Each order item is sent as:
AW:P|<Advertiser ID>|<order ref>|<product ID>|<name>|<unit price>|<quantity>|<SKU>|<commission group>|<category>
- Unit price = the line total after discounts, before tax, divided by quantity.
- Product ID follows the ID setting (max 75 characters); name and category max 100 characters; category = the product’s first category.
- Pipes are removed from values, as Awin requires.
- On the fallback pixel, lines stop being added before the URL passes 7,500 characters, Awin’s limit for image pixels.
Consent
Awin makes the advertiser responsible for getting cookie consent and telling Awin the result. PixelYourSite does this through Awin’s consent signals (AdvertiserConsent, cons), in one of two modes.
| Visitor | Load Awin before consent: Off (default) | Load Awin before consent: On |
|---|---|---|
| Consented | MasterTag on every page, Conversion Tag, PLT and fallback pixel with cons=1; click stored in awc | Same |
| No consent, normal Awin click | Nothing loads, nothing is stored, the sale is not reported | MasterTag loads with AdvertiserConsent=false; the sale is reported with cons=0 and no click ID; Awin sets no tracking cookies |
No consent, cashback click (sn=1) | Click stored in awc_sn; the sale is reported by the fallback pixel only, with cons=0 and the cashback click as cks | Click stored in awc_sn; full tags with cons=0 and the cashback click |
| Consent given later on the landing page | MasterTag loads; the landing awc / source / sn are posted to the server so it can set its cookies | Consent status updated in the MasterTag; same hand-off |
- Cashback exception. Awin treats cashback and loyalty cookies as strictly necessary and asks to pass
awc_snunconditionally. Turn this off withadd_filter( 'pys_awin_incentive_without_consent', '__return_false' );. - Explicit consent for click IDs. When a consent plugin is installed but the visitor has not answered yet, PixelYourSite does not store a normal click ID.
- Consent plugins. Cookiebot (Awin category, default
marketing), ConsentMagic (an Awin category; without one, Awin follows the Facebook category), CookieYes / Cookie Law Info, Cookie Notice and Real Cookie Banner. A custom setup can use thepys_disable_awin_by_gdprfilter. - IAB TCF. Awin is IAB TCF vendor 907; PixelYourSite does not read TCF strings for Awin, it uses the consent plugin’s answer.
- Turn on Load Awin before consent only after checking it with your legal advisor. The
pys_awin_consent_modefilter overrides the option.
De-duplication
The channel tells Awin who won the last click. Awin’s rule: aw for every Awin-referred sale, and aw as the fallback when the source is unknown. Paid channels you de-duplicate against (for example ppc, display, another network) send their own value.
How PixelYourSite picks the channel:
- A landing with an Awin click (
awc=) storesawin_source=aw, whatever else the URL says. - A landing without an Awin click but with
?source=<value>stores that value (lower-case letters, digits,_,-, max 50). Later landings overwrite it: last click wins. - On the thank-you page the stored source is sent as
channel/ch. With no stored source, the Default channel (aw) is sent.
- The source cookie lasts 30 days and is stored only with consent, or for a cashback click.
- With Read the channel from the “source” URL parameter off, every sale carries the default channel.
- For de-duplication to work, links from your other paid channels must carry
?source=<channel>(for example?source=ppcon your Google Ads final URLs). Awin’s redirect already addssource=awto its own links. - To use a different parameter or your own logic, use the
pys_awin_channelfilter.
Testing
Test with Awin’s Tracking Diagnosis and keep PixelYourSite’s Test mode off: Awin does not process sales sent with test=1, so they would not appear as tracked. If your programme is already live, ask Awin Advertiser Support how to test first.
- In Awin: Support > Integration > Tracking Diagnosis > Create a test transaction, and open the test publisher link it gives you.
- Accept cookies on your site, then place a real order. For PLT, buy two products with different quantities; to check a commission group, use a product in that group.
- Back in Tracking Diagnosis, search the order reference. The result is Tracked Successfully, Warnings or Critical Issues.
- If asked, send your Awin Integrations contact a screenshot of the order confirmation page with the order reference, total, items, coupons, tax and shipping.
Awin’s advice for the test browser: desktop, not Safari, ad and tracking blockers off.
Checking on your side
- Landing page: in DevTools > Application > Cookies,
awc(HttpOnly) andawin_source=awexist after consent. - Any page except checkout: a request to
www.dwin1.com/<Advertiser ID>.js. - Thank-you page: a request to
www.awin1.com/sread.img?tt=ns&tv=2&merchant=…with the expectedamount,parts,ref,ch,cksandcons; the page source contains<textarea … id="aw_basket">when PLT is on. - With PixelYourSite debug mode on, the console shows
[Awin] Salewith the declared values. - Reload the thank-you page: no second
sread.imgrequest. - The order has
_pys_awin_conversionmeta with afiredAttimestamp, and_pys_awin_clickwhen a click was kept. - PixelYourSite > System Report has an Awin section: Advertiser ID, enabled, test mode, load before consent, sale switches, default channel.
Developer reference
Filters (all in the PixelYourSite plugin; examples on the PixelYourSite “Filter & Hook List” page):
| Filter | Arguments | Use |
|---|---|---|
pys_awin_advertiser_id | $id | Pick the Awin programme per language, domain or currency. An invalid value turns Awin off for the request. |
pys_awin_consent_mode | $on | Force Awin’s own consent model on or off (overrides “Load Awin before consent”). |
pys_awin_incentive_without_consent | $send, $sale | Return false to stop reporting cashback sales without consent. |
pys_disable_awin_by_gdpr | $disabled | Block Awin from your own consent logic. |
pys_explicit_consent | $explicit, $pixel | Whether a real consent answer exists; needed to store a normal click ID. |
pys_awin_excluded_page | $excluded | Keep the Awin tags off more pages (checkout and order-pay are excluded already). |
pys_awin_channel | $channel, $source | Your own de-duplication logic. |
pys_awin_conversion_data | $sale, $order | Edit the sale before it is saved on the order; runs once per order. |
pys_awin_click_ids | $ids, $consent | Change the click IDs sent as cks. |
pys_awin_cookie_options | $options, $name | Cookie options for awc, awc_sn, awin_source (expires, path, domain, secure, httponly, samesite). |
pys_awin_fallback_pixel_url | $url, $sale | Change the pixel URL, for example another Awin host if Awin asks. |
Data stored by the integration:
| Name | Kind | Content |
|---|---|---|
awc | Cookie, HttpOnly, 365 days | Normal Awin click ID (with consent) |
awc_sn | Cookie, HttpOnly, 365 days | Cashback click ID |
awin_source | Cookie, HttpOnly, 30 days | Last-click source for the channel |
_pys_awin_click | Order meta | Click IDs and source at the time of the order |
_pys_awin_conversion | Order meta | The computed sale, plus firedAt once sent |
The browser fires a awin_event_sent window event with the declared sale in detail.data. The AJAX action pys_awin_click receives the landing awc, source and sn after consent and sets the cookies.
Limitations and open points
The biggest gap: no server-to-server tracking. Awin’s sales-tracking guide calls at least one server-side method mandatory for its hybrid tracking; today every sale depends on the browser reaching the thank-you page.
| Item | Impact | Status |
|---|---|---|
No server-to-server (Conversion API or sread.php?tt=ss) | Sales lost to ad blockers, closed tabs, gateways that never return | Not implemented |
| One commission group per order | No commission by product or category | By design |
| Amount always excludes shipping | Fine for Awin’s recommendation; no option to include it | By design |
| PLT unit prices ignore negative fees | Line totals may not add up to amount when a negative fee exists | Minor |
| Custom parameter 1 holds the plugin version | One custom slot used | Change with pys_awin_conversion_data |
| Help text says commission codes are case-sensitive | Awin’s help centre says condition matching is case-insensitive; the plugin upper-cases codes | Help text to review |
Cashback flag read only as sn=1 | Awin’s example treats any sn value as cashback | To verify with Awin |
click property on AWIN.Tracking.Sale | Not in Awin’s public Conversion Tag docs; the fallback pixel carries cks either way | To verify with Awin |
| Refunds and cancellations | Not synced; validate in Awin under Commissions > Review commission payments | Not implemented |
| Lead tracking, custom events | Not available | Not implemented |
| EDD 2.x | Not supported | By design |
