Overview
Use this setup when you want Affonso to capture affiliate visits automatically in the browser. The tracking pixel handles the first touch:- detects supported referral parameters on landing
- records the visit
- stores the referral as a browser cookie for later attribution
- calling
window.Affonso.signup()when a user registers - sending payment or conversion data from your backend
If you prefer not to load the browser pixel at all, use
Without Tracking Pixel instead.
1. Add the pixel to your site
Place the Affonso pixel in the<head> of every page where affiliate traffic
can land:
- creates the global
window.Affonsoobject - checks the current URL for supported referral parameters
- stores the referral in a cookie for the configured duration
2. Track signups after registration
When a visitor signs up, tell Affonso about the new lead:- call this after a successful signup
- if you use double opt-in, call it after email verification
- it is safe to call this for every signup; Affonso only creates a lead when a valid referral cookie is present
- the existing tracked visit is converted into a lead
- the referral becomes visible in your and the affiliate’s reporting
- later backend events can be matched more reliably with your user identifiers
If your checkout can happen before account creation, you can skip signup
tracking and go straight to conversion tracking in the next step.
3. Pass referral data to your payment provider
The pixel does not create commissions on its own. After signup, you still need to make sure the referral value reaches your checkout or billing flow. Choose one of these paths:Option 1: Use a supported payment provider integration
If you use a payment provider that Affonso integrates with directly, start there first. That is usually the simplest setup. Supported providers include:- Stripe
- Polar
- Paddle
- Dodo Payments
- Creem
All Payment Integrations
Browse the native setup guides for Stripe, Polar, Paddle, Dodo Payments,
Creem, and more.
Stripe Checkout API
Example guide for passing referral data into Stripe Checkout.
- initial payments
- recurring renewals
- refunds
When to choose this option
Choose this path when your billing system already runs on one of the supported providers and you want Affonso to handle the provider event mapping for you.Option 2: Use server-side conversions for custom payment flows
If you do not want to use the provider integration, or your payment provider is not supported directly, use Affonso’s server-side conversion flow instead. When a purchase, invoice, or subscription event happens on your backend, send it to Affonso using one of the server-side tracking endpoints. Most custom setups usePOST /v1/conversions:
cURL
- use
click_idfor the first backend conversion if the user has not been linked to your own customer record yet - use
customer_idorexternal_user_idonce your application has a stable identifier for that user
Server-Side Tracking
Choose the right backend endpoint for conversions, events, and refunds.
Record Lead Signup
API reference for the browser-equivalent signup tracking call.
Custom Payment Provider Guide
Use this when you need to wire up a non-native billing or checkout flow.
