Yes – but the setup differs slightly depending on whether you're using subdomains or completely separate domains. To ensure proper affiliate tracking, you’ll need to install the Affonso tracking script on both your website and your app domain.
Subdomains (e.g. yourwebsite.com → app.yourwebsite.com)
If your site and app share the same root domain, tracking works out of the box. Just make sure the Affonso tracking script is installed on both the marketing site and the app:
<script
async
defer
src="https://affonso.io/js/pixel.min.js"
data-affonso="YOUR_PUBLIC_PROGRAM_ID"
data-cookie_duration="YOUR_COOKIE_DURATION"
></script>
The tracking cookie (affonso_referral
) is shared across all subdomains, so no extra work is needed.
Different domains (e.g. yourwebsite.com → yourapp.com)
Browsers do not share cookies across domains, so you'll need to pass the affiliate tracking info manually.
When redirecting from your website to your app, forward the original affiliate tracking parameter (?ref=abc123
, ?via=
, ?atp=
, etc.) in the URL.
Example redirect:
const query = window.location.search;
window.location.href = `https://yourapp.com/signup${query}`;
As long as the parameter is present in the URL on your app domain, Affonso will pick it up again and set the correct cookie there.
Important: Be sure the tracking script is installed on both domains.