How to track affiliate sales: per link, in Google Analytics and in WordPress

November 21, 2026 · Hoplytic team · 3 min read

The short version: this guide in 65 seconds.
Read the video transcript

Your network shows what you earned, but not which link earned it. How do you close that gap?

Google Analytics and WordPress plugins can count clicks, but they can't see the sale.

The network dashboard shows sales per program or offer, with no setup. A sub-ID label per placement shows sales per page, video or campaign, but it's manual. A click ID plus a report upload matches each sale to its click. A click ID plus a postback or API sync does it automatically, and nothing depends on browser cookies.

GA4 records outbound clicks, but the purchase happens on the merchant's site, so it can't see sales. Link plugins cloak links and count clicks. For sales per post, use a tracker with a small script on your pages.

In Hoplytic you paste a link, and it detects the network and adds a unique click ID. Sales come back by postback, hourly API connection, or report upload, and each lands on the exact click.

The full guide is right below. Hoplytic: ad tracking made simple.

Your network dashboard shows what you earned. It usually can't show which link, page, video or ad earned it. These are the ways to close that gap, from zero setup to fully matched sales.

Short answer: give every click a unique ID, pass it to the network in its sub-ID field, and bring sales back with that ID, by postback, network API or report upload. Then each sale lands on the exact click, page and ad. Google Analytics and WordPress plugins can count clicks, but they can't see the sale.

Four ways to track affiliate sales

MethodShows sales perEffort
1. Network dashboard onlyProgram or offerNone
2. One sub-ID or tracking ID per placementPlacement (page, video, campaign)Low, manual
3. Click ID in the sub-ID + report uploadClick (and so page, ad, country, device)Medium
4. Click ID + postback or API syncClick, automatically, in minutesSetup once

1. The network dashboard

Fine with one site and a few offers. Breaks down once the same offer is in many places: you see the total, not where it came from.

2. A sub-ID per placement

Add a label to each link's sub-ID field: clickref=tents-review on Awin, sid=yt-video-12 on CJ, a separate tracking ID on Amazon. Reports then group by label. It works, but it's manual and tells you nothing about the visitor or the ad.

3. A click ID plus report upload

A tracker puts a unique ID for every click into the sub-ID field. Export the network's sales report with the sub-ID column and upload it, and each sale matches its click. Good for networks without postbacks (Amazon, Rakuten and others). See click ID tracking.

4. A click ID plus postback or API

The network calls your postback URL with the click ID when a sale happens, or the tracker pulls sales from the network's API every hour. Sales show up on their own, statuses update from pending to approved, and nothing depends on browser cookies. See S2S vs pixel tracking.

How to track Amazon affiliate sales

Amazon is a special case: no postback for most accounts and reports grouped by tracking ID. Use one tracking ID per site or campaign and import the earnings report. Full guide: Amazon affiliate link tracker.

On Hoplytic

Paste an affiliate link and Hoplytic detects the network (25 built in) and puts a unique click ID in the right sub-ID slot. Sales come back through your hosted postback URL, hourly API connections (TUNE, Everflow, Awin, Partnerize, ClickBank, Impact, CJ, Affise, CAKE, Takeads) or report upload (Amazon, Rakuten and more), and each lands on the exact click. Add the one-line site script and you also see the page, spot and link text. Free for the first 3 months.

Paste your affiliate link, name it, create it, copy it.

Questions people ask

Can Google Analytics track affiliate sales?

Not directly. GA4 can count clicks on affiliate links (outbound click events), but the sale happens on the merchant's site, which your GA can't see. To see sales per link or page, pass a click ID to the network as a sub-ID and bring the sales back with a postback or report.

How do I track affiliate links in WordPress?

A link plugin (Pretty Links, ThirstyAffiliates) counts clicks on cloaked links. For sales per link, use a tracker that adds a click ID to each affiliate link, and add its site script to record which page and spot each click came from.

What is the most accurate way to track affiliate sales?

Server-to-server: a unique click ID in the network's sub-ID field, and a postback (or API sync) that reports each sale with that ID. It doesn't depend on cookies in the visitor's browser.

More in Conversion tracking

Also: tracking glossary · ad platform macros · Markdown copy