Background
⌘K

Stripe Pricing Tables

Learn how to add affiliate tracking to your Stripe Pricing Tables for proper commission attribution.

Silvestro
Written by Silvestro
Updated more than a month ago

Stripe Pricing Tables Integration

💡 Make sure your Stripe account is connected.

Installation

Add this script to your website's <head> section, right after your Affonso tracking script:

<!-- Your existing Affonso 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>

<!-- Add this enhancement script right after -->
<script>
  function enhanceStripePricingTables() {
    if (window.affonso_referral) {
      document.querySelectorAll('stripe-pricing-table').forEach((table) => {
        table.setAttribute('client-reference-id', window.affonso_referral);
      });
    }
  }

  setTimeout(enhanceStripePricingTables, 800);
  setTimeout(enhanceStripePricingTables, 1500);
  setTimeout(enhanceStripePricingTables, 2500);
  window.addEventListener('affonso_referral_ready', enhanceStripePricingTables);
</script>

That's it! Your Pricing Table will now automatically include affiliate tracking data when customers make purchases.

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.