TapCub is live — analytics, insights and live chat, free on one platform
Growth & Marketing

How Affiliate Links Work and How to Track Them

An affiliate link carries an ID so a purchase can be credited to the sender within a cookie window set by the program. See the anatomy of a link, real window lengths, browser limits, earnings math and how to track clicks with UTM parameters.

Oliver Reed Published Nov 20, 2026 12 min read Growth & Marketing
Sample data: the same six sales are credited very differently depending on the window. A 30-day program credits five, a 24-hour program one, and a browser that deletes the stored ID after 7 days cuts the five to three.Sample data

An affiliate link is a normal link with an identifier saying who sent the visitor. A cookie stores the ID on click, and a purchase inside the program's window earns the sender a commission. Below: link anatomy, cookie windows and browser limits, earnings maths, disclosure rules and tracking.

What you will learn

  • Windows are set by the program and differ: Amazon credits 24 hours from the click (89 days for cart purchases), Awin calls 30 days the standard
  • Browsers can shorten the window: script-set cookies after a decorated link last 24 hours, and script-written storage is deleted after 7 days without interaction
  • Compare earnings per click across pages, reconcile your click count with the network's, and disclose the connection next to the link

What an affiliate link is made of

An affiliate link is an ordinary link to a merchant's page with an extra identifier that says who sent the visitor. When a purchase can be tied back to that identifier, the merchant pays the sender a commission. Amazon's agreement describes them as links that must use the special "tagged" link formats it provides; Awin's help adds that link parameters can carry data such as product details or campaign information.

Sample data: a link as it might look when it lands on the merchant's site.

https://www.shop.example/chairs/ergo-1?aff_id=A1042&sub=chair-review&utm_source=affiliate&utm_medium=referral&utm_campaign=chair-review

Splitting it with Python's urllib.parse gives the parts:

PartValueWho reads it
Host and pathwww.shop.example/chairs/ergo-1The visitor lands on this product page
aff_idA1042The affiliate program: who gets paid
subchair-reviewThe affiliate's own sub-ID: which page or post sent the click
utm_source, utm_medium, utm_campaignaffiliate, referral, chair-reviewThe merchant's analytics: which channel and campaign

The parameter names (aff_id, sub) differ between programs; only the pattern is universal. A link usually does not go straight to the merchant. Many programs send the click through a tracking address on the network's domain first, which records it and redirects the visitor to the merchant with the identifier attached.

What happens between the click and the commission

  1. The click. A visitor clicks the link on your page. If the link goes through a tracking address, that server logs the click with your ID and a timestamp.
  2. The redirect. The visitor is sent to the merchant's page. The affiliate ID travels in the URL.
  3. The memory. The merchant or network stores the ID in a cookie, or in a first-party record, so it can be found later. This is the step that expires.
  4. The purchase. The visitor buys, sometimes minutes later and sometimes after weeks.
  5. The match. The merchant looks up the stored ID and checks that the purchase falls inside the program's window. If it does, a commission is recorded as pending.
  6. The confirmation. Programs commonly hold a commission for a return period before it becomes payable and reverse it if the order is refunded; check your program's terms.

Step 3 is where affiliate links lose sales, and step 5 explains why two programs can credit the same click differently.

The window is the time between the click and the purchase during which the affiliate is still credited. It is set by the program, not by you, and the published numbers differ.

  • Amazon's Program Policies say a session ends when 24 hours elapse from the click, but a purchase made through a cart can still count if completed no later than 89 days after the initial click-through of the link. The purchase must also be shipped and paid for within 180 days.
  • Awin's help describes the cookie duration as how long a cookie remains valid after a click, calls 30 days the industry standard, and notes that durations may vary by program.

Browsers can shorten the effective window. WebKit's tracking prevention caps cookies created in JavaScript on a landing page reached through link decoration (an identifier added to the URL) to 24 hours, and deletes all script-written cookies and storage after 7 days without the user interacting with the site. A purchase that falls inside a 30-day window can still be lost.

Sample data: six clicks and when each buyer purchased, checked against three windows.

ClickPurchaseDays24-hour window30-day window7-day browser cap
2 Nov2 Nov0CreditedCreditedCredited
2 Nov3 Nov1Not creditedCreditedCredited
2 Nov30 Nov28Not creditedCreditedLost
5 Nov15 Dec40Not creditedNot creditedLost
9 Nov12 Nov3Not creditedCreditedCredited
10 Nov18 Nov8Not creditedCreditedLost

Reading the table: a 30-day program credits five of six; a 24-hour program credits one; and if the browser deletes the stored ID after 7 days (assuming the buyer did not visit the merchant in between), two of the five 30-day sales are lost anyway. The more your readers research before buying, the more a short or capped window costs you.

app.tapcub.com

Sales credited out of 6

sample data, click-to-purchase days 0, 1, 28, 40, 3, 8
24-hour window1 of 6
30-day window5 of 6
30-day window, stored ID deleted after 7 days3 of 6
Sample data
Sample data: the same six sales are credited very differently depending on the window. A 30-day program credits five, a 24-hour program one, and a browser that deletes the stored ID after 7 days cuts the five to three.

What an affiliate link earns

Commission = clicks × conversion rate × average order value × commission rate. Sample data: 400 clicks, a 3% conversion rate, orders of $80 and an 8% commission give 400 × 0.03 = 12 orders, $960 of sales and $76.80 of commission. Earnings per click is $76.80 ÷ 400 = $0.192.

Conversion rateOrdersSalesCommission at 8%Earnings per click
2%8$640$51.20$0.128
3%12$960$76.80$0.192
4%16$1,280$102.40$0.256

Earnings per click is the number to compare across pages and programs, because it folds the conversion rate, order value and commission together. Two cautions: your clicks and the network's clicks will rarely match (your page may count 1,000 outbound clicks while the network reports 930, a 7.0% gap), and commissions can be reversed if an order is refunded. Reconcile the gap before trusting either number; common causes are double-counted clicks, visitors who leave before the redirect finishes and bots.

Conversion rateOrdersSalesCommission at 8%Earnings per click
2%8$640$51.20$0.128
3%12$960$76.80$0.192
4%16$1,280$102.40$0.256

Sample data: 400 clicks and $80 orders. Commission = clicks × conversion rate × order value × commission rate.

Disclosure, nofollow and sponsored: the rules that apply to you

Affiliate links come with obligations for the publisher.

  • Tell readers. The FTC's guidance for endorsers says to disclose a financial or other material connection, to place the disclosure with the endorsement message itself, and that disclosures are likely to be missed if they appear only on an About page or behind a "more" click. Amazon's agreement requires its associates to state "As an Amazon Associate I earn from qualifying purchases" or a substantially similar statement. Put the notice at the top of the page, not the footer.
  • Mark the link. Google's guidance says to mark advertisements and paid placements with the sponsored value of the rel attribute, user-generated links with ugc, and to use nofollow where the others do not apply. Links marked this way will generally not be followed, though the pages may be found by other means.
  • Check the program's own rules. Programs set their own disclosure wording and link formats; follow both.

A short template that satisfies the plain reading of these rules: "This page contains affiliate links. If you buy through them we may earn a commission at no extra cost to you." Place it before the first link and use rel="sponsored" on each link.

How to track affiliate links with UTM parameters

You can be on either side of the link, and the tracking differs.

If you are the publisher you want to know which pages send clicks and which clicks the network later confirms. Count outbound clicks on your own site per page, record them weekly next to the network's report, and use the sub-ID (sub above) to tell which article produced each sale.

If you are the merchant with an affiliate program, you want to know which affiliates bring buyers and what they cost. Require affiliates to send utm_source (the affiliate's name or ID), utm_medium=affiliate and utm_campaign (the placement), and keep the affiliate ID parameter too. The ID decides who is paid; the UTM parameters let your own analytics compare affiliates beside every other channel. Keep naming consistent, because Affiliate, affiliate and affiliates become three rows; see UTM parameters.

CheckWhy
Test one real link end to endConfirm the ID survives every redirect
Test in Safari and in a private windowSee whether the stored ID lasts
Compare sales in your analytics with the network's report each monthAs a rule of thumb, a gap above about 10% is a tracking problem to investigate
Keep a list of every affiliate link with its sub-IDYou cannot fix what you cannot find

How to see affiliate traffic in TapCub

TapCub does not issue affiliate links or pay commissions; it measures the traffic and sales on your own site. Use the same sample links and clicks above.

TapCub Sources report listing visitors by UTM source over the last 30 days
Demo data: the UTM source table in TapCub, where an affiliate's utm_source would appear as its own row. The numbers are demonstration data.
  1. As a publisher, count outbound clicks. The website script records an outbound click, as the event __outbound, whenever the link host differs from your site, so a click on a link that goes to a network's tracking address is counted automatically. Open Web analytics › Events, where outbound clicks appear with a readable label, and open the row for property keys and values. See track outbound links. Compare the total with the network's report to find the 7.0% gap in the example.
  2. As a merchant, read the channel. In Web analytics › Sources, the UTM tab splits visitors by source, medium and campaign, and the Channels tab shows conversions. Visitors arriving with utm_source=affiliate appear under their own row, ready to compare with every other channel. Sources and UTM lists the rules, and name UTM parameters gives a naming scheme.
  3. Add what you paid. In All-platform analytics › Business › Channel ROI, open the Costs tab and enter the commission you pay as that row's cost by day, channel, source and campaign (CSV or one row at a time). The page then shows cost per click and cost per acquisition, where conversions are purchases on the order ledger, and return on ad spend.

TapCub does not decide whether a click matches a sale in the network's system and does not run the affiliate program. It shows what each source brought and what it cost.

FAQ

An affiliate link carries an identifier. When a visitor clicks it, the network or merchant records the click and stores the ID in a cookie. If the visitor buys within the program's window, the sale is matched to the ID and the affiliate earns a commission, which becomes payable after any return period.

It depends on the program. Amazon's window is 24 hours from the click, extended to 89 days if the item is added to a cart, and Awin calls 30 days the industry standard. Browser rules can shorten it: WebKit limits cookies set by script on a landing page reached through a decorated link to 24 hours, and deletes script-written cookies after 7 days without interaction.

Count outbound clicks per page on your own site, give each placement a sub-ID, and compare your counts with the network's report each month. If you run a program, require UTM parameters on top of the affiliate ID, and review sources beside your other channels.

Yes. The FTC says to disclose material connections, including financial ones, with the endorsement itself in a way people will see and understand; programs such as Amazon's also require a specific statement. Mark each link with rel="sponsored" as Google asks for paid links.

Why did I not get paid for a sale I sent?

The purchase may have fallen outside the window, the browser may have deleted the stored ID, the buyer may have clicked another affiliate's link later, or the sale was returned. Check the program's window and rules first, then compare click and sale dates as in the table above.

Sources

Was this article helpful?

We use your answers to fix and expand this page.

Oliver Reed

Product Experience Specialist

Explores usability, user journeys, and feature adoption through practical examples of onboarding and everyday product use.

See which sources bring buyers

UTM source, medium and campaign by visitor and conversion, outbound click counts and spend by channel in one project.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics