Connect Base44 to Qanary

Time: ~10 minutes. You need: a Qanary program (its slug), your billing provider already connected in Qanary onboarding, and admin access to your Base44 app.

1 · Paste the tracking snippet

<script src="https://app.qanary.cloud/qanary.js" data-qanary="YOUR_PROGRAM_SLUG" async></script>

Open your app’s Settings and look for a custom code / head-scripts field — the same place you’d add Google Analytics or a Meta Pixel — and paste the tag. Don’t see one on your plan? Ask Base44’s builder chat to add the tag to your page head instead.

The snippet sets the first-party attribution cookie when a visitor lands with ?via=AFFILIATE_CODE (the link format your affiliates already share) and records the touchpoint.

2 · Carry the referral into checkout

Wherever your app’s checkout flow calls Stripe, read Qanary.checkoutStamp() client-side and send stamp.ref into client_reference_id.

3 · Verify

  1. Open your app with ?via=<a promoter code> in a private window.
  2. Run a test-mode checkout.
  3. In Qanary: the conversion appears attributed to that promoter — or ask your coding agent to run the MCP diagnose_attribution tool, which walks visit → identify → webhook → attribution → ledger and tells you exactly where anything is off.
  4. Optional: add a webhook endpoint (Webhooks page) and press Send test event to verify your automation receiver too.

Verification checklist (fill in before publishing)

  • Snippet loads on the published app (not just the builder preview)
  • ?via= visit recorded (check_events shows the touchpoint)
  • Test checkout attributes to the right promoter
  • Recorded by: ______ / date: ______