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

> Four ways to track affiliate sales, from network reports to sub-IDs and postbacks, plus how to track affiliate links in Google Analytics 4 and in WordPress, and what each can't see.

Source: https://hoplytic.com/blog/how-to-track-affiliate-sales · Updated 2026-11-21 · Hoplytic Guides

Video version (65 seconds): [https://hoplytic.com/video/how-to-track-affiliate-sales.mp4](https://hoplytic.com/video/how-to-track-affiliate-sales.mp4)

## 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

| Method | Shows sales per | Effort |
| --- | --- | --- |
| 1. Network dashboard only | Program or offer | None |
| 2. One sub-ID or tracking ID per placement | Placement (page, video, campaign) | Low, manual |
| 3. Click ID in the sub-ID + report upload | Click (and so page, ad, country, device) | Medium |
| 4. Click ID + postback or API sync | Click, automatically, in minutes | Setup 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](https://hoplytic.com/blog/click-id-tracking).

### 4. A click ID plus postback or API

The network calls your [postback URL](https://hoplytic.com/blog/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](https://hoplytic.com/blog/s2s-vs-pixel-tracking).

## How to track affiliate links in Google Analytics (GA4)

- **Clicks:** GA4's enhanced measurement records outbound clicks automatically, with the link URL. You can also send a custom event when an affiliate link is clicked.

- **Traffic sources:** UTM tags tell GA which campaign brought visitors to your page. See [UTM vs sub-ID](https://hoplytic.com/blog/utm-vs-sub-id).

- **Sales: not possible on its own.** The purchase happens on the merchant's site, under their analytics, not yours. GA doesn't know a click led to a commission unless you import sales from somewhere else.

## How to track affiliate links in WordPress

- **Link plugins** (Pretty Links, ThirstyAffiliates, Lasso) cloak links and count clicks. Free versions usually stop there. See [link cloaking](https://hoplytic.com/blog/link-cloaking).

- **Sales per post:** use a tracker that adds a click ID to each affiliate link, plus a small script on your pages that records which page and spot every click came from. Then a sale can be traced to the exact article and button.

## 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](https://hoplytic.com/blog/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](https://hoplytic.com/help/site-script) and you also see the page, spot and link text. Free for the first 3 months.

![Making a tracking link in Hoplytic: paste an Awin affiliate link, the network is detected and the click ID goes into its sub-ID, name the link, create it and copy the short link.](https://hoplytic.com/video/howto-link-create.gif)

*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.
