Paste one script tag via a header/footer plugin or your theme, keep the ?via= links your affiliates already share, and Qanary starts tracking through to your checkout — no new plugin subscription required.
header/footer plugin, or straight in the theme. that's the whole install.
However you're tracking referrals on WordPress today — a spreadsheet, a generic pixel, or nothing yet — attribution needs to survive ad blockers, the commission math needs to survive an audit, and the payout needs to go out on a rail you already use. Here's what one script tag adds:
Basic click tracking at best — no coupon-code fallback for ad blockers or podcasts, no fraud check before a commission is owed, and payouts mean a manual spreadsheet.
One script tag in a header/footer plugin (e.g. WPCode, Insert Headers and Footers) or your theme's header.php, right before </head>. Coupon-code fallback, fraud checks before
commission, and payouts through Wise or PayPal — the same system whether
you're on WordPress or anywhere else.
1. Paste the tracking snippet — a header/footer plugin (e.g. WPCode, Insert Headers and Footers) or your theme's header.php, right before </head>. It sets the
first-party attribution cookie when a visitor lands with
?via=AFFILIATE_CODE and records the touchpoint.
2. Carry the referral into checkout — if you run Stripe Checkout via a server action or the Stripe plugin, read Qanary.checkoutStamp() in the page workflow and send stamp.ref into client_reference_id (Stripe) or customData.qanary_ref (Paddle).
3. Verify — open your site with a test ?via=,
run a test-mode checkout, and confirm the conversion lands attributed — or ask
your coding agent to run the MCP diagnose_attribution tool.
<script src="https://app.qanary.cloud/qanary.js" data-qanary="YOUR_PROGRAM_SLUG" async></script>
Paste this exact tag into a header/footer plugin (e.g. WPCode, Insert Headers and Footers) or your theme's header.php, right before </head>, publish, and it's
live. Swap YOUR_PROGRAM_SLUG for the program slug from your
Qanary dashboard.
Reads ?via=AFFILIATE_CODE off the URL the moment a visitor lands
and records the touchpoint — no configuration beyond the program slug.
Feeds the stamp into your Stripe plugin or Checkout Session as client_reference_id, so a sale still traces back to the right affiliate.
Ask your coding agent to run diagnose_attribution and it walks
visit → identify → webhook → attribution → ledger, so a stalled conversion is
never a mystery.
The most common shape: a Stripe or WooCommerce-adjacent checkout plugin. The stamp feeds into its Checkout Session call.
Gated content behind MemberPress, Restrict Content Pro, or similar — the snippet in the theme header keeps attributing independent of the access logic.
WordPress runs the content; a separate app handles billing. Keep ?via= on the links out and the cookie carries the referral across.
Swap the old tracking plugin's snippet for Qanary's in the same header field — existing ?via= links your affiliates already shared keep working.
| Capability | Tracking it yourself | Qanary |
|---|---|---|
| Setup time on WordPress | Custom dev project | ~10 minutes |
| One snippet instead of another plugin + subscription | No | Yes |
| Fraud checked before commission is owed | No | Yes |
| Falls back with no page to instrument | No | Yes, via coupon codes |
async,
so it never blocks page rendering while it sets the attribution cookie.
Via a header/footer plugin like WPCode or Insert Headers and Footers, or directly in your theme's header.php right before </head>. Either way it needs to load site-wide.
No — it loads with the async attribute, so it fetches in the
background and never blocks page rendering.
No — a free header/footer plugin (WPCode, Insert Headers and Footers) is enough to place the snippet, or you can paste it straight into your theme if you're comfortable editing header.php.
No — it works alongside it. The tracking snippet only sets the attribution cookie and reads the stamp into whatever checkout call your existing plugin already makes.
Yes — point Claude Code, Cursor, or Codex at Qanary's llms.txt
and it can install the tracking snippet and wire a webhook from a single
prompt. See the AI agent page for the exact setup.
Join the waitlist now; when registration opens, wire your WordPress site in ten minutes.
Join the waitlist