Marketing & Tracking
Install the AFFY tracking script on your website to attribute affiliate-referred visitors and conversions automatically. Choose your platform below for step-by-step instructions.
Your Tracking Script
Add this snippet to the <head> of every page on your site. Replace the placeholder values with the ones shown in Program Settings → Marketing & Tracking.
<script
async
defer
src="https://cdn.affy.pro/js/pixel.min.js"
data-affy.pro="YOUR_PUBLIC_PROGRAM_ID"
data-cookie_duration="YOUR_COOKIE_DURATION"
></script>YOUR_PUBLIC_PROGRAM_IDFound in Program Settings → Marketing & Tracking. This is your public identifier — safe to expose in front-end code.
YOUR_COOKIE_DURATIONNumber of days the affiliate referral cookie is kept. 30 is a common default. Match it to your cookie policy.
Platform-Specific Installation
For any static site or custom HTML project, paste the snippet directly inside your <head> tag.
Add to your HTML layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Site</title>
<!-- AFFY Tracking Script -->
<script
async
defer
src="https://cdn.affy.pro/js/pixel.min.js"
data-affy.pro="YOUR_PUBLIC_PROGRAM_ID"
data-cookie_duration="30"
></script>
</head>
<body>
<!-- page content -->
</body>
</html>Testing
- Open your site with the test parameter:
yoursite.com?atp=test - Open DevTools → Application → Cookies
- Confirm an
affy_click_idcookie was set - Check your AFFY dashboard — a test click should appear
affy_click_id cookie stores the affiliate referral for the duration you configured. When a conversion fires (via the Tracking API or a billing webhook), AFFY reads this cookie to attribute the commission to the correct affiliate.Next Steps
Tracking API
Fire conversion events server-side when a payment or sign-up occurs.
Stripe Integration
Automatically attribute Stripe payment events to affiliates via webhooks.
Commission Flows
Define how commissions are calculated for each conversion.
Installation Guide
Full installation walkthrough including verification steps.