Can I track user signups as leads in Affonso?

Written By Silvestro

Last updated 10 months ago

Yes! Affonso supports optional signup tracking to help you and your affiliates better understand conversion funnels. Signups tracked this way are shown as “LEAD” in the dashboard — they’re not commissionable, but they provide helpful visibility into affiliate performance.

How does it work?

When a user signs up after visiting your site via an affiliate link, you can call the following function:

window.Affonso.signup(userEmail)

This logs a “LEAD” if the user has a valid referral cookie.

Where should I add this?

Ideally, you should run it after a successful registration or after double opt-in (if you use email verification). It’s a small browser-side script and won’t affect performance.

What if I use an auth provider like Clerk?

No problem. If you're using Clerk, you can call the tracking function once the user is authenticated. For example, in a useEffect or similar hook:

if (user && window.Affonso) { 
  window.Affonso.signup(user.email) 
}

This ensures the lead is tracked once the user session is confirmed.

What if I use Google Auth or another OAuth provider?

That works too! If your app uses OAuth (like Google, GitHub, etc.), the same principle applies — once the user has successfully signed in and you have access to their email, you can trigger the signup tracking like this:

if (user && window.Affonso) {
  window.Affonso.signup(user.email)
}

You can typically place this in a component that runs after authentication is complete — for example after a login callback. Just make sure it only fires once.

Need help setting this up? Just reach out via live chat — happy to help!