Background
⌘K

Bubble Integration

Learn how to integrate Affonso affiliate tracking into your Bubble no-code application.

Silvestro
Written by Silvestro
Updated more than a month ago

Bubble's no-code platform allows custom JavaScript integration through HTML elements and SEO settings, making it perfect for adding affiliate tracking to your SaaS application.

Add tracking script to your Bubble app

The recommended approach is to use Bubble's SEO/meta tags settings to add the script globally across all pages of your application.

  1. Open your Bubble editor

  2. Go to Settings → SEO/Metatags

  3. In the Script/meta tags in header section, add your tracking script:

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

  5. Deploy your app for the changes to take effect

Alternative: Add an HTML element to specific pages and paste the script code for page-specific tracking.

For more details, see Bubble's guide.

Find your Program ID →

Testing

  1. Deploy your Bubble app after adding the script
  2. Visit your live app with ?atp=test
  3. Check browser DevTools → Console → type window.affonso_referral
  4. Verify tracking in your Affonso dashboard

Note: Custom scripts only work on the live/deployed version, not in Bubble's preview mode.

Multi-Domain Setup

If you're using Bubble for your complete SaaS application, the tracking script will handle everything in one place. However, if you have a separate marketing site (e.g., yourcompany.com) while your Bubble app runs on a subdomain (e.g., app.yourcompany.com), make sure to install the Affonso tracking script on both domains.

Affonso works seamlessly across subdomains - the same affiliate cookie will be shared between domains. See our multi-domain setup guide for more details on cross-domain tracking.

Next Steps

Once installed, you can access affiliate referral data and pass it to your payment provider. Connect your payment provider →

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.