Program Settings

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.

Tracking Script
html
<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_ID

Found in Program Settings → Marketing & Tracking. This is your public identifier — safe to expose in front-end code.

YOUR_COOKIE_DURATION

Number 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

index.html / layout template
html
<!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

  1. Open your site with the test parameter: yoursite.com?atp=test
  2. Open DevTools → Application → Cookies
  3. Confirm an affy_click_id cookie was set
  4. Check your AFFY dashboard — a test click should appear
The 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.