Track Affiliate Commissions in Google Analytics 4
Stream every affiliate commission into Google Analytics 4, attributed to its true source, right next to your sessions.
IN THIS PLAYBOOK · 8 SECTIONS
What You'll Build
Open GA4 and see the money next to your sessions. AnyTrack AutoTags your offer links, tracks every outbound click, and matches each network postback to the click that earned it. It then streams the whole journey into Google Analytics 4 server-side, payout values and traffic source included.
- GA4 shows your revenue: payouts land next to your sessions, engagement time, and top pages.
- Your winners show up: each payout carries the page, channel, and campaign that sent the buyer.
- Audiences build on money events: you can retarget offer-clickers and exclude buyers, because GA4 knows who clicked out and who converted.
The Journey of a Tracked Conversion
Follow one reader from your page, through the offer link, to a commission reported in GA4 with its source attached. Every step streams automatically.
Steps marked with the AnyTrack node run automatically. No extra code, no manual tagging.
Example Scenario
You run a review site promoting offers across two networks, with traffic arriving from SEO, an email list, and some paid tests. The networks report commissions in their own dashboards, and none of it connects back to a page or source. You want GA4 to show earnings per channel and per article, plus audiences of offer-clickers your linked Google Ads account can work with.
The conversion happens on a domain you don’t own, and the commission lands in a network dashboard GA4 has never heard of. Until postbacks reach GA4, its revenue reads $0 and your audiences can’t build on money events.
- An AnyTrack account on Starter or above (server-side integrations require a paid plan)
- An affiliate network that can fire a server-to-server conversion postback with your own subid (Impact, ClickBank, MaxBounty, Everflow, and most CPA networks can)
- An active Google Analytics 4 property with admin access
- Your own content or presell pages where you can install the Tracking Tag
Step 1: Install the Tracking Tag
Paste the Tracking Tag (install guide in the knowledge base) before </head> on your site. From the moment it loads, AnyTrack AutoTags every outbound offer link with a fresh click ID, carried to your network as a subid, and tracks each click as an OutboundClick event tied to the session’s source and UTM parameters. Organic reader, email subscriber, or paid click: every session carries its origin with it.
Hover an offer link on your page: the subid should already carry a click ID. If it doesn’t, the payout can’t find its way back to the page that earned it.
Step 2: Connect Your Affiliate Network
In AnyTrack, open the Integration Catalog, install your network’s integration and copy the postback URL it gives you, then paste that URL into your network’s postback or server-to-server settings. AnyTrack pre-fills the subid parameters (subid guide in the knowledge base): s1 carries the click ID that matches each conversion back to its session. Send these values on the postback:
click_id(ass1): the match key that ties the commission to the page and source that earned it.transaction_id: the network’s unique order ID, so a retried postback doesn’t double-count.payoutandcurrency: the numbers your GA4 revenue reports will run on.
Most networks have a pre-built template. If yours isn’t in the catalog, follow the Custom Affiliate Network guide in the knowledge base to wire the same postback by hand. ClickBank users have a dedicated flow in the ClickBank integration guide in the knowledge base. Repeat for each network you promote; every one streams into the same property.
A network test conversion only tracks if it passes the click ID back through the subid. Plan on one real qualifying sale to confirm the loop end to end.
Step 3: Connect Google Analytics 4
Follow the Google Analytics 4 setup guide in the knowledge base to connect your property from the Integration Catalog: select your Google account, your GA4 property, and its web data stream, then turn on the Server-Side Tracking API and map your events. Map Purchase at minimum, and map OutboundClick too; it’s the intent signal your audiences will build on.
AnyTrack streams each mapped event through the Measurement Protocol, server-side, enriched with attribution data, UTM source, and campaign before it leaves. Your existing GA4 tag stays where it is; this stream adds the conversions and payout values browser tracking never sees.
The division of labor is worth being clear about: your AnyTrack dashboard stays the near real-time source of truth for payouts and matching, while GA4 becomes the analysis layer, where commissions sit inside the acquisition reports, segments, and audience tools you already use.
Step 4: Mark Key Events and Build the Audiences
Two switches turn the stream into reports and retargeting pools.
First, in GA4, open Configure → Events and toggle Mark as key event on Purchase. Key events surface as conversions across GA4’s reporting, which puts commission revenue next to sessions in your acquisition reports: earnings per source, per campaign, per landing page.
Then open Admin → Audiences and create the pools:
- Offer-clickers: visitors with an
OutboundClickevent but noPurchase. They chose an offer and stalled at the merchant; the warmest traffic you own. - Buyers: anyone with a
Purchaseevent. Build it for exclusions, so you stop paying to re-win a commission you already earned.
GA4 audiences fill going forward from creation. Set them up now, before scaling any traffic source, and give them a day or two to accumulate members.
Step 5: Launch the Campaign Stack
Running on SEO and email alone for now? Steps 1 through 4 stand on their own: you still get revenue per page and source in GA4, and the audiences quietly accumulate until you’re ready to spend. When you are, link your GA4 property to Google Ads and both audiences appear in the shared library automatically. Two campaigns put them to work. And if you want Google’s bidding itself optimizing on commissions, that’s its own play: run this playbook’s sibling, Track Affiliate Commissions Back to Your Google Ads Campaigns, on the same setup.
Retargeting: recover the offer-clickers
The redirect blackout used to swallow these readers. Now they’re a pool.
- Destination: the review or comparison page for the offer they clicked, with Auto-Tag enabled and AnyTrack’s UTM tracking template in the account-level tracking template, so the return visit is attributed like the first.
- Budget: start small, 10 to 15% of whatever you spend filling the pool. The audience size is the ceiling; scale with it, not ahead of it.
- Audience: the offer-clickers audience on Display and YouTube, with buyers excluded everywhere.
- Event tracking: fed by the
OutboundClickevents AnyTrack streams into GA4; generates the second-chancePurchasepostbacks that pull each buyer out of the pool automatically. - Conversion objective: your
Purchasekey event, so the campaign reports recovered commissions instead of clicks.
Search: bid up the warm readers
Offer-clickers don’t stop searching after they stall. Meet them on the next query.
- Destination: your best-EPC page for the offer’s niche, same tracking template at the account level.
- Budget: fold into your existing Search spend; this is a bid adjustment, not a new line item.
- Audience: layer the offer-clickers audience onto your Search campaigns as an observation audience with a positive bid adjustment, and keep the buyers audience as an exclusion.
- Event tracking: runs on the same
OutboundClickandPurchasestream; every payout the campaign produces arrives in GA4 attributed to it. - Conversion objective: the
Purchasekey event, so warm-reader clicks justify their premium in commissions, not traffic.
The Optimization Loop
The stream never idles. Every outbound click a reader triggers updates the offer-clicker pool, every postback that comes home lands in GA4 with its payout and source attached, and every buyer quietly moves from your retargeting audience to your exclusion list without a spreadsheet touched. AnyTrack matches and streams as each event happens; GA4 folds the data in on its own rhythm, near-instant in DebugView, complete in standard reports within a day or two. The result compounds while you sleep: pages keep reporting what they earn, pools keep sorting themselves sharper.
Your job is a weekly reading:
- Measure. Open GA4’s traffic acquisition report with
Purchaserevenue in view: earnings per source, campaign, and landing page, every network combined. Cross-check the network integration’s Event Log guide in the knowledge base in AnyTrack to confirm every payout arrived and matched. - Improve. Feed the pages and sources with proven EPC: more internal links, more email sends, more budget. Pause promotions with plenty of
OutboundClickand no payouts; the offer is the problem, not the page. Tighten or widen the offer-clicker window as the retargeting pool runs hot or thin. - Expand. A page with proven EPC earns a second offer test, and a niche with proven commissions earns a new article cluster. As volume grows, split the offer-clicker pool into tiers by recency, and let the freshest clickers carry the strongest bids.
GA4 finally answers the affiliate question that matters: not “where does my traffic come from?” but “where does my money come from?” The loop above keeps sharpening that answer week after week.
Wrapping Up
Here’s what you shipped:
- Every outbound offer click tracked with its source, and every commission matched back to the page that earned it.
- Payouts from all your networks streaming into one GA4 property, server-side, with values and attribution attached.
- Offer-clicker and buyer audiences that fill themselves, wired into your linked Google Ads account.
- A weekly loop that reads one report and moves effort toward the pages, sources, and offers that pay.
The networks still count your money. Now your analytics does too.
Explore Related Playbooks
Track Affiliate Commissions to Facebook Ads
Close the redirect loop with AutoTagged links and postbacks, so Facebook learns which ad set earned each sale.
Track Affiliate Commissions to Google Ads
Close the redirect loop with AutoTagged links and postbacks, so Google Ads sees the keyword and campaign that earned each sale.
Track ClickBank Commissions to TikTok Ads
Close the redirect loop with AutoTagged hop links and postbacks, so TikTok learns which ad earned each sale.