Stripe Pricing Tables

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

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://cdn.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>
  • Replace YOUR_PUBLIC_PROGRAM_ID with your program ID from the Affonso dashboard
  • Set YOUR_COOKIE_DURATION to how many days the tracking should persist

🍪 Need GDPR/Cookie Consent compliance? Add data-requires-consent="true" to the script above and follow our GDPR integration guide for privacy-first tracking.

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

Was this article helpful?