Integrations
Partnero affiliate referrals
Credit a Partnero affiliate for an order placed on the storefront — the storefront remembers the referral link a shopper followed and hands it to WooCommerce, where Partnero reads it.
Partnero – Affiliate & Referral Program Management for WordPress runs your affiliate programme: affiliates share referral links, and the plugin credits them for the orders those links bring. On its own it can’t see a storefront visit: its script would set its cookie on WordPress’s pages, which shoppers never open, so every referred order arrived with no affiliate. With this integration the storefront remembers the referral link itself and hands it to WooCommerce with the order, where Partnero finds it and pays the commission as usual.
This page covers only what the storefront needs. For the plugin itself (commissions, payouts, the affiliate portal), follow its own documentation on its WordPress.org page.
- Where it shows
- Any storefront page a referral link points at; the order's Origin in WooCommerce; the affiliate's account in Partnero
- Configure in
- Partnero in WordPress; the switch under StoreFront › Settings › Affiliate referrals;
AFFILIATE_REF_PARAMon the storefront when the programme's links don't use?ref= - Requires
- Partnero 2.6.x, connected to an affiliate programme; WooCommerce's Order Attribution feature (on by default); the Companion plugin
- Try it in Demo Mode
- Demo Mode publishes a programme only when the storefront runs with
FAKE_THEME_AFFILIATE=1
What shoppers and affiliates get
Section titled “What shoppers and affiliates get”- Nothing changes for the shopper. A referral link opens the page it points at, on the storefront, in the usual way: the home page, a product, a blog post. There is no banner, no detour they can see and nothing to accept.
- The affiliate is credited. An order placed within the programme’s cookie lifetime is attributed to the affiliate whose link the shopper followed most recently, and Partnero posts their commission when the order reaches a tracked status, exactly as it would for a WordPress checkout.
- Clicks are counted too. Partnero’s own tracking script runs on the storefront with your programme, so link clicks and visits show in the affiliate’s Partnero account alongside their sales.
- Every public address can be a referral link. An affiliate can send shoppers to a specific product or post, not only to the home page, and the credit still lands.
How it works
Section titled “How it works”The Companion plugin reads what the storefront needs from Partnero’s own connection and nothing else: the programme’s id, its Cookie Lifetime in days and the query parameter its referral links carry the key in. It publishes them with the rest of the store’s settings while the Track affiliate referrals on the storefront switch is on and all three are known. It writes nothing to orders. In wp-admin it warns administrators about anything that would silently lose a commission.
The storefront then does what Partnero’s script would do on a WordPress page, and one thing more:
- It remembers the landing. When a page is opened with the programme’s parameter in the address (
?ref=KEYby default), the storefront stores that page, key included, in a cookie for as many days as the Cookie Lifetime says. The shopper is sent straight on to the page they asked for, with the key still in the address. - It counts the click. Partnero’s tracking script is loaded with your programme’s id on every page where tags may run, so Partnero records the click and the visit itself.
- It hands the landing to WooCommerce. When the order is placed, the storefront sends the remembered page as the order’s WooCommerce Order Attribution entry page, marked as a referral. WooCommerce stores it on the order.
- Partnero reads it. Finding no cookie of its own, Partnero falls back to that entry page, reads the key out of it by your programme’s link format, and credits the affiliate. The commission is posted when the order reaches one of the statuses in Track orders on status.
The last link wins: a later referral link, from the same or another affiliate, replaces the remembered landing and restarts the window. That is what Partnero’s own script does.
What the storefront needs
Section titled “What the storefront needs”Set Partnero up as its own documentation describes. For the storefront, these are what matter:
- Partnero is connected to your affiliate programme. Under Partnero → Affiliate Program, enter the API Key and press Connect Affiliate Program. The storefront learns the programme, its Cookie Lifetime and its link parameter from this connection; nothing is typed anywhere else.
- WooCommerce’s Order Attribution is on, under WooCommerce → Settings → Advanced → Features. It is on by default. Off, WooCommerce drops the landing before Partnero can see it, and no referred order keeps its affiliate.
- The programme’s referral links use a query parameter. In your Partnero account, the programme’s link format
must be
?ref=KEY(or another parameter name, such as?aff=KEY), not the path form/aff/KEY/. The storefront reads query parameters only. Set the programme’s attribution to last click, which is how the storefront remembers links. - The tracked order statuses include the ones your orders reach. Under Partnero → Affiliate Program → Order Tracking Settings, Track orders on status defaults to Processing and Completed; keep both.
- The switch is on under StoreFrontSettingsAffiliate referrals: Track affiliate referrals on the storefront. The tab shows what the storefront will be told; every line should read as known (see The Affiliate referrals tab).
- The storefront knows the parameter name, if it isn’t
ref. Whoever deploys the storefront setsAFFILIATE_REF_PARAMto the parameter your programme’s links use (for exampleaff) and redeploys. Unset, the storefront watches for?ref=, Partnero’s default. See Environment variables.
To check, open the storefront in a private window with a test affiliate’s link, place a test order, and open it under WooCommerce → Orders: its Origin should read Referral: affiliate, and the affiliate should appear on the order in Partnero once the order is Processing.
What the storefront follows
Section titled “What the storefront follows”| Partnero setting | On the storefront |
|---|---|
| The connected affiliate programme | Partnero’s tracking script is loaded with this programme’s id, so clicks and visits are counted against it. |
| Cookie Lifetime (the programme’s) | How long a referral link is remembered. The storefront uses exactly this number of days: no window of its own, no default. |
| The referral link format and parameter (the programme’s) | The storefront reads the key by the parameter your programme names. A path format (/aff/KEY/) is not supported: nothing is remembered, and wp-admin says so. |
| Track orders on status | Partnero’s own: it decides when the commission is posted. The storefront isn’t involved once the order exists. |
| Attribution: first or last click (the programme’s) | The storefront always remembers the most recent link, so last click matches. Partnero never replaces a key already on an order. |
| Disconnecting the programme (Detach Program) | Forgets the programme at once: the storefront stops remembering referrals and loading the script. |
Not used: sign-up tracking (a shopper who creates an account through a referral link isn’t attributed as a sign-up; only their orders are) and the Refer-a-Friend Program. Commission calculation, excluded categories, coupons and payouts all happen in Partnero once the order exists, as they do for a WordPress checkout.
The Affiliate referrals tab
Section titled “The Affiliate referrals tab”The tab has one setting, the switch Track affiliate referrals on the storefront, and four read-only lines that show what the storefront will be told. Nothing else is typed: a programme id typed by hand could drift from the connection the Cookie Lifetime comes from.
| Line | What it shows |
|---|---|
| Programme | Whether Partnero is active and connected, and the programme’s name and id as named in Partnero. |
| Attribution window | The programme’s Cookie Lifetime in days, or Unknown until Partnero has answered. |
| Referral links | The address pattern the storefront watches for, such as ?aff=KEY, as set in your programme. |
| WooCommerce Order Attribution | On, or Off with where to switch it on. |
The programme is read from Partnero when the switch is saved, when Partnero is connected or disconnected, and once a day when an administrator opens wp-admin. A read that fails keeps the last known value and is tried again an hour later. Partnero is never contacted during a shopper’s visit.
Consent and where the script runs
Section titled “Consent and where the script runs”Partnero’s tracking script sets a cookie for a third party, so the storefront treats it like any other marketing tag:
- Never on checkout, payment or order confirmation pages, where no third-party code runs. The order’s attribution doesn’t depend on the script, so the credit still lands.
- With Complianz, the script waits for the shopper to accept Marketing. A shopper who declines is still remembered and their order still credited; only Partnero’s click count misses them. See Complianz cookie consent.
- Not through Header/Footer Scripts. The script is placed by the storefront from the published programme, so an edit to the scripts boxes can’t switch affiliate tracking off by accident. Don’t paste Partnero’s snippet there as well, or clicks are counted twice.
Good to know
Section titled “Good to know”- The key stays in the address. After the storefront has remembered the landing, the shopper sees the page with
the key still there and a small marker added (
?aff=KEY&rsr=1). The marker is what stops the storefront looking again; it also means a browser that refuses cookies still reaches the page. - A copied address carries the marker. If a shopper copies the address after landing and shares it, Partnero’s script counts whoever follows it as a click, but the storefront remembers nothing for them. The affiliate’s own link, as Partnero hands it out, never carries the marker.
- Prices, stock and the cart are untouched. Remembering a referral changes nothing the shopper sees or buys.
- A referred order shows in WooCommerce too. Its Origin reads Referral: affiliate on the order and in the Orders list, and WooCommerce’s own attribution reports count it.
- Changes reach the storefront like any other setting. Saving the switch, or connecting or disconnecting Partnero, tells the storefront within about a minute. Each page picks the change up on its next visit and shows it from the one after, so reload twice to see it.
- The Companion plugin watches Partnero’s version. It shows a wp-admin notice when the active Partnero is outside the 2.6.x line the integration was verified with. Commissions keep flowing; the notice asks for a check before relying on the newer version.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| A wp-admin notice says affiliate referrals from the storefront will not reach Partnero | Order Attribution is off, Partnero isn’t connected, the programme’s links use the path format, or the switch is on before the programme is known. | The notice lists each reason that applies; the steps in What the storefront needs cover them. |
| Referred orders arrive in Partnero with no affiliate | The switch is off, or the storefront watches for the wrong parameter. | Check the switch on the Affiliate referrals tab. In the storefront’s logs, a warning names the parameter mismatch: set AFFILIATE_REF_PARAM to the programme’s parameter and redeploy. |
| The tab says Connected, but the programme is not known yet | Partnero’s API didn’t answer when the programme was read. | Reopen wp-admin a little later; a failed read is tried again after an hour. If it stays unknown, Detach Program and connect again. |
| The order’s Origin reads Referral: affiliate but Partnero shows no commission | The order hasn’t reached a tracked status, or the key isn’t one of the programme’s affiliates. | Check Track orders on status under Order Tracking Settings, and the key in the order’s attribution entry page against the affiliate’s link in Partnero. |
| Sales are credited but clicks aren’t counted | The shopper hasn’t accepted Marketing cookies, or the link points at a page where no tags run. | Expected under a consent tool; the commission doesn’t depend on the click. |
| The affiliate is credited twice for one click | Partnero’s snippet is also pasted into Header/Footer Scripts. | Remove it; the storefront loads the script from the published programme. |