Skip to main content
Every affiliate gets a unique referral code. Your tracking link follows this format:
AgentRef-generated links default to ?via=YOUR_CODE. Some programs may still expose ref, r, a, or merchant-configured aliases for inbound attribution. When someone clicks your link, AgentRef:
  1. Records the click with your affiliate ID
  2. Sets a first-party cookie on the visitor’s browser
  3. Tracks the visitor across the cookie window (typically 30-90 days)
  4. Attributes any conversion back to you

Referral Code

Your referral code is set when you join a program. It’s usually your name or brand:
Affiliate API keys can create named tracking links for a joined program. Use destination_path for a merchant-approved path on the merchant website and custom_slug when you want a specific referral code for that link. destination_path must be a relative path such as /pricing or /blog/review. It must be in the program’s allowed destination list. custom_slug must be 3-32 lowercase letters, numbers, or hyphens.
The current update contract is narrower than the create contract. PATCH /api/v1/me/links/{id} accepts name, targetUrl, and isActive; it does not accept destination_path or custom_slug. Use targetUrl when you need to point an existing link at a full URL, and create a new link when you need a different approved destination path or custom slug.
Each program sets a cookie window – the number of days a click stays valid. If a visitor clicks your link today and purchases within the window, you get credit. The merchant configures this per program.

UTM & Sub-ID Tracking

You can append tracking parameters to your links for your own analytics:

Supported Parameters

These are tracked per click and visible in your affiliate dashboard.

Attribution Model

AgentRef uses last-click attribution: the last affiliate link clicked before conversion gets the commission. If a visitor clicks affiliate A’s link, then later clicks affiliate B’s link and purchases – affiliate B gets credit.

Viewing Your Clicks

In the Dashboard

Your dashboard shows click analytics: total clicks, unique visitors, click-through rates, and geographic breakdown.

Via API

Use the affiliate self-serve clicks endpoint to inspect a specific reporting window:
Use sub-IDs (sub1-sub5) to track which content, placement, or campaign drives the most conversions. This helps you optimize your promotion strategy.