Background
⌘K

Framer Integration

Learn how to integrate Affonso with your Framer website for automatic affiliate tracking through payment links.

Silvestro
Written by Silvestro
Updated more than a month ago

Framer creates Single Page Applications (SPAs) that require special handling for affiliate tracking. This guide shows you how to integrate Affonso with your Framer site to automatically track affiliate referrals through payment links.

Prerequisites

  • Active Affonso affiliate program
  • Payment links from your payment provider
  • Access to your Framer project's custom code settings

Step 1: Add Main Tracking Script

In Framer → Site SettingsGeneralCustom Code

Add this in the End of <head> tag section:

<script
  async
  defer
  src="https://affonso.io/js/pixel.min.js"
  data-affonso="YOUR_PUBLIC_PROGRAM_ID"
  data-cookie_duration="YOUR_COOKIE_DURATION"
></script>

Find your Program ID →

Choose your payment provider below to get the Framer-specific enhancement script:

Stripe
Polar
Creem
Dodo Payments

Step 3: Publish Your Site

Click Publish in Framer - your payment links will now automatically include affiliate tracking!

Why Framer Needs Special Handling

Framer creates SPAs where:

  • Scripts load once when site first loads
  • Page navigation doesn't reload scripts
  • Our enhancement includes MutationObserver for instant SPA support

Testing

  1. Create a test affiliate link in your Affonso dashboard
  2. Visit your Framer site using that affiliate link
  3. Navigate to a page with payment links
  4. Right-click a payment link → Copy link address
  5. Check that the link includes tracking:
    • Stripe: client_reference_id=...
    • Polar: reference_id=...
    • Creem: metadata[affonso_referral]=...
    • Dodo: metadata_affonso_referral=...

Browser Check: Press F12 → Console → type window.affonso_referral (should show your referral ID)

Performance Impact

  • Without affiliate traffic: Zero CPU usage (completely idle)
  • With affiliate traffic: ~0.1% CPU usage (event-driven only)
  • Enhancement: Happens instantly when new content loads

Was this article helpful?

If you still need help, our support team is here for you.

Contact Support
bg

Ready to Scale Your SaaS?

Affonso is the easiest way to launch your own affiliate program. We take care of the technical stuff, so you can focus on growing your business.