Track referrals and attribution
Understand how clicks, signups, and payments connect a customer to the right affiliate.
Tracking starts when someone visits your site through an affiliate's referral link. The link includes a referral code. Your tracking snippet records the visit after tracking is enabled, and your signup integration connects that visitor to a customer. A trusted payment event completes the path to a commission.
Cookie
The cookie window is the time a referred click remains eligible for attribution. Your product defaults to 30 days. Choose a window that fits how long customers usually take to decide, and communicate it in your program terms.
The snippet uses first-party cookies for an anonymous visitor ID and a referral code. The product's attribution window is checked against event timing on the server; a cookie still existing in a browser does not by itself prove that a sale qualifies. A visit outside the allowed window will not qualify through that click.
Attribution
Your attribution model decides who receives credit when more than one affiliate refers the same visitor. First click selects the earliest eligible referral. Last click selects the most recent eligible referral and is the product default. Review this choice before publishing your program terms.
For server-side signups, include the visitor ID from anderro.getVisitorId() alongside the customer's email. This links the customer to the visit. If later payments arrive with only an email address, send the signup from your backend with your secret key; browser signups are not used for that trusted email match.
Repeated clicks can be deduplicated, so repeatedly opening one link is not a reliable way to test your click total. Self-referrals are blocked. Check the customer journey and partnership status when a payment does not produce the commission you expected.
Auto
The snippet waits for opt-in by default. Connect anderro.optIn() to your site's consent flow so tracking starts when the visitor agrees. Automatic mode starts tracking immediately through data-auto="true"; use it only when immediate tracking fits your site's consent requirements. The snippet does not decide a visitor's location for you.
Keep consent behavior consistent across the pages where you install the snippet. If your site uses a Content Security Policy, allow the tracking host for both scripts and connections so the snippet can load and send events.
Check the full journey
Verify a referred click, then a signup with that visitor ID, then a payment from your backend or supported provider. A browser payment call records analytics but never creates a commission. Follow integration testing to check each stage separately before relying on live results.