Integrations — MemberStack

Affiliate tracking for your MemberStack site. One snippet, ten minutes.

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.

Beyond MemberStack's built-in tools

Gated sign-up shouldn't mean gated attribution.

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:

Tracking it yourself

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.

Qanary

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.

How it works

Paste, stamp, verify. Three steps.

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.

custom code · memberstack
<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.

What the snippet does

One tag. Three jobs.

Sets the attribution cookie

Reads ?via=AFFILIATE_CODE off the URL the moment a visitor lands and records the touchpoint — no configuration beyond the program slug.

Stamps your Stripe checkout

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.

Verifiable end to end

Ask your coding agent to run diagnose_attribution and it walks visit → identify → webhook → attribution → ledger, so a stalled conversion is never a mystery.

Common MemberStack setups

Whatever's gated behind your paywall.

Gated content behind MemberStack

The tracking snippet sits independently of MemberStack's own auth logic — it attributes the referral before MemberStack even checks membership status.

Free trial → paid conversion

A visitor signs up free and upgrades later — the attribution cookie set at first visit still gets credit when the upgrade fires the webhook.

Multiple pricing plans

Whichever plan a referred member picks, the commission reflects the actual sale — no flat per-signup rate that under- or over-pays.

Migrating from another tool

Swap the old tracking snippet for Qanary's in the same custom code field — existing ?via= links your affiliates already shared keep working.

At a glance

See it side by side.

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
Why this beats a spreadsheet

It works the day you publish.

FAQ

Fair questions.

Where exactly does the snippet go with MemberStack?

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.

Does the snippet slow down my site?

No — it loads with the async attribute, so it fetches in the background and never blocks page rendering.

Does attribution survive a free-trial-to-paid upgrade?

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.

How does the stamp reach MemberStack's Stripe checkout?

Pass Qanary.checkoutStamp().ref into the client_reference_id field when your server creates the Stripe Checkout Session that MemberStack triggers.

Can an AI agent install this for me?

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.

Go deeper

Everything you need to start tracking.

Paste the snippet. Start tracking tonight.

Join the waitlist now; when registration opens, wire your MemberStack site in ten minutes.

Join the waitlist