Background
⌘K

Unbounce Integration

Learn how to integrate Affonso affiliate tracking into your Unbounce landing pages.

Silvestro
Written by Silvestro
Updated more than a month ago

Unbounce's JavaScript management feature allows you to add custom tracking scripts to your landing pages, perfect for SaaS companies using Unbounce for high-converting marketing campaigns.

Add tracking script to your Unbounce page

Unbounce's recommended approach is to use the JavaScript section in the page editor, which ensures the script loads properly with Unbounce's optimized page loading system.

  1. Open your landing page in the Unbounce Builder

  2. Click on Javascripts in the sidebar (or Page Properties → Javascripts)

  3. Click Add Javascript

  4. Set the placement to Head

  5. 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>
  1. Click Save
  2. Publish your landing page

Alternative: Use the "Before Body End Tag" placement if you prefer the script to load after page content, or add it at the domain level for multiple pages.

For more details, see Unbounce's official JavaScript guide.

Find your Program ID →

Testing

  1. Publish your Unbounce landing page
  2. Visit your published page with ?atp=test
  3. Check browser DevTools → Console → type window.affonso_referral
  4. Verify tracking in your Affonso dashboard

Note: Changes to JavaScript require republishing the page to take effect.

Multi-Domain Setup

If you're using Unbounce for landing pages (e.g., campaign.yourcompany.com) while your main application runs elsewhere (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.