Paste one script tag into your site's custom code, keep the ?via= links your affiliates already share, and Qanary attributes the sale straight through MemberStack's gated sign-up.
settings → custom code → head, before . that's the whole install.
However you're tracking referrals on MemberStack 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 Settings → Custom Code → Head, before the closing </head>. Coupon-code fallback, fraud checks before commission, and payouts through Wise or PayPal — the same system whether you're on MemberStack or anywhere else.
1. Paste the tracking snippet — Settings → Custom Code → Head, before the closing </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 — MemberStack sites usually check out through Stripe — pass the Qanary stamp into your Stripe Checkout call server-side (client_reference_id), or simply keep the ?via= parameter on your pricing links and let the cookie rung pick it up.
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 Settings → Custom Code → Head, before the closing </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 MemberStack's Stripe Checkout call as client_reference_id, so a new member's plan 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 tracking snippet sits independently of MemberStack's own auth logic — it attributes the referral before MemberStack even checks membership status.
A visitor signs up free and upgrades later — the attribution cookie set at first visit still gets credit when the upgrade fires the webhook.
Whichever plan a referred member picks, the commission reflects the actual sale — no flat per-signup rate that under- or over-pays.
Swap the old tracking snippet for Qanary's in the same custom code field — existing ?via= links your affiliates already shared keep working.
| Capability | Tracking it yourself | Qanary |
|---|---|---|
| Setup time on MemberStack | Custom dev project | ~10 minutes |
| Attributes through gated sign-up | 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.
Settings → Custom Code → Head, right before the closing </head> tag, then publish. It needs to load site-wide, including on pages behind MemberStack's gate.
No — it loads with the async attribute, so it fetches in the
background and never blocks page rendering.
Yes — the attribution cookie is set on first visit and persists, so when a free member later upgrades to a paid plan, the commission still credits the original affiliate.
Pass Qanary.checkoutStamp().ref into the client_reference_id field when your server creates the Stripe Checkout Session that MemberStack triggers.
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 MemberStack site in ten minutes.
Join the waitlist