Tracking and Attribution Reference
For full script options and runtime method details, see Tracking Script Reference.
Canonical URL Parameter
Use ?via=TOKEN for affiliate token attribution.
Optional Custom Parameter Names
You can define additional token parameter names with script attribute:
<script
async
src="https://cdn.jsdelivr.net/npm/@relay-capital/affiliatebase-tracking@1.0.9/dist/track.min.js"
data-account-id="YOUR_ACCOUNT_ID"
data-affiliatebase-params="partner,invite">
</script>
Referral Preload
?referral=<referral_id> preloads an existing referral.
Use this for controlled return links where you already know the generated referral ID. Do not use a public ?via token as a Stripe client_reference_id.
Cross-Domain Tagging
Use data-domains in script config to append affiliate link tokens to configured external hosts so the next site can create or refresh its own referral state.
Conversion Call
affiliatebase('convert', { email: 'customer@example.com' });
Notes
- Use
viaas the default token parameter - Keep referral and checkout flows on HTTPS in production
- For API endpoints and auth, see REST API Overview