Tracking Affiliates in Google Analytics 4 (GA4)
In this article
Why your affiliate numbers never match GA4
Before you begin: what you need on hand
What tracking affiliates in GA4 actually means
Method 1: Native GA4 affiliate tracking with no code
Method 2: Google Tag Manager for full control
The UTM naming system that survives a year
Capturing affiliate sales and revenue
Building the affiliate report in GA4
Fix attribution: DDA versus last-click
How to track affiliates with Tapfiliate (the GA4 alternative)
Five mistakes that break affiliate tracking in GA4
Tracking affiliates in GA4: the quick takeaways
FAQ
TL;DR — Tracking affiliates in Google Analytics 4 (GA4) runs on three things: outbound click events, UTM tags, and purchase events tied to an affiliate ID.
- Turn on Enhanced Measurement to catch outbound affiliate clicks in minutes.
- Move to Google Tag Manager when you want full control over the event.
- Build a free-form exploration to see clicks and revenue per partner.
- Fix the attribution model before you trust any total.
- GA4 shows behavior. A platform like Tapfiliate handles the commissions GA4 was never built to run.
It is Wednesday morning. Two browser tabs are open. One shows your affiliate network. The other shows GA4.
The network swears 412 sales came from partners last month. GA4 counts 198. Same month. Same store. A gap worth thousands of dollars.
You refresh both. The numbers do not move. Somebody is wrong, and you need to know who before the finance call at noon.
Here is the promise. By the end of this guide, you will close that gap for good. You will also find the one attribution setting that almost everyone leaves wrong. It quietly hides half your partner revenue. We resolve it near the end, so keep reading.
This matters more every year. U.S. affiliate marketing spend reached close to 12 billion dollars in 2026, up from 9.56 billion in 2023. That is real budget riding on numbers you can actually trust.
Why your affiliate numbers never match GA4
Your numbers disagree because the two tools measure different things. The network counts referred sales. GA4 counts sessions and events on your own site. Neither is lying. They simply answer different questions.
Think of it like two referees at the same match. One watches the ball. The other watches the offside line. Both are right, yet their notes never look identical.
The attribution gap explained
A partner sends a click. The visitor browses, leaves, then thinks it over for three days. They return through a Google search and buy.
Your network still credits the partner who started the journey. GA4 often credits organic search, because that was the last touch it saw. One sale, two very different stories.
That single mismatch explains most of the gap on your screen. The fix is not magic. It is a setting plus a method. Tracking affiliates in Google Analytics 4 (GA4) begins by naming the problem out loud.
Why the stakes are high
Affiliate marketing is not a side channel anymore. Most brands now run a program, and the returns are hard to ignore.
Studies put the average return near 15 dollars for every dollar spent on the channel. When a number like that is on the table, guesswork is expensive. Misread the data and you cut the partners who were quietly carrying your growth.

Before you begin: what you need on hand
Setup goes faster when the pieces are ready first. None of this is hard to gather. Most of it you already own.
You need admin access to your GA4 property. Without it, you cannot toggle settings or register dimensions. Borrow access from whoever set up GA4 if needed.
You need to know your affiliate link pattern. Look at one partner link and find the marker. It is usually a path like slash go, or a query like ref or aff.
A Google Tag Manager container helps for the advanced method. It is free and quick to install. The native method works without it for now.
Finally, decide what success looks like. For most teams, tracking affiliates in Google Analytics 4 (GA4) means three trusted numbers per partner. Clicks, sales, and revenue. Keep that goal pinned as you build.
With those four things ready, the rest is mostly clicking through menus. Tracking affiliates in Google Analytics 4 (GA4) rewards preparation more than technical skill.

What tracking affiliates in GA4 actually means
Tracking affiliates in GA4 means recording two distinct moments. The click on a partner link, and the sale that may follow it. They are not the same data point, and treating them as one is the first mistake.
Most guides stop at the click. That is the easy half. The money lives in the second half, where a sale gets tied back to the partner who earned it.
Clicks versus conversions
A click is an event. It fires the instant a reader taps your affiliate link and heads to the merchant. That part is cheap to capture and quick to set up.
A conversion is harder to see. The buyer often finishes the purchase on a domain you do not own. GA4 cannot watch that checkout unless you feed it the data yourself.
So strong tracking does three jobs at once. It captures the outbound click. It tags the traffic source with a clean label. It links any returning purchase back to the right partner.
The data you actually want
By the end of setup, you want three columns per partner. Clicks sent, sales driven, and revenue earned. Everything below builds toward that simple grid.
Keep that picture in mind as you work. If a step does not move you closer to those three columns, it is probably noise you can skip.
Method 1: Native GA4 affiliate tracking with no code
You can start tracking affiliates in Google Analytics 4 (GA4) without calling a developer. The native path uses settings already sitting inside your property. It is the fastest way to get a real number on the board.
This method suits smaller programs and quick validation. It will not capture commission logic, but it proves the channel is alive and clicking.
Enable Enhanced Measurement
Open Admin, then Data Streams, then your web stream. Find Enhanced Measurement and switch on Outbound clicks. Save and close.
GA4 now logs a click event whenever someone leaves for another domain. Affiliate links point off-site by nature, so they qualify on their own. You do not tag each link by hand.
This is the fastest win in the whole guide. It takes about two minutes. It needs zero code on your pages, and it works the moment you toggle it.

Catch the outbound clicks
Wait a day for data to gather. Then head to Reports, then Engagement, then Events. You will see click events stacking up in the list.
Open the click event and look at the link_url parameter. It holds the destination of every outbound tap. Filter that field for your affiliate domains, and the raw click volume appears in front of you.
This already beats guessing. But it mixes your money links with every other off-site link on the page. The next step cleans that up.
Create a custom event for affiliate clicks
Raw outbound clicks blend everything together. Your footer social icons and your high-value affiliate links land in the same bucket. That is too messy to report on.
So build a custom event to isolate the ones that matter. In Admin, open Events, then choose Create event. Name the new event affiliate_click so its purpose is obvious.
Set the matching condition with care. Use event_name equals click, plus link_url contains your affiliate marker. A marker might be a path like slash go slash, or a query string like ref equals.
Save it and you are done. Affiliate clicks now live in their own clean event. Mark it as a key event if you want GA4 to treat it as a conversion later on.
Know the limits of the no-code path
This method counts clicks well. It does not natively connect a later purchase to the partner who sent the visitor. For that link you need an ID, a cookie, and a tagged purchase event.
We cover that chain further down. For now, enjoy a working click count that took minutes, not days.
Method 2: Google Tag Manager for full control
Native tracking is quick but blunt. When you want precise rules and richer data, Google Tag Manager is the better tool for tracking affiliates in GA4. It is also where you start capturing the affiliate ID that powers revenue reports.
GTM sits between your site and GA4. It listens for actions, then fires tags on your terms. That control is worth the small learning curve.
Build a click trigger
Open GTM and create a new trigger. Choose the type Click, then Just Links. This watches link clicks specifically, which is what affiliate URLs are.
Set the trigger to fire on some link clicks only. Use the condition Click URL contains your affiliate marker. That stops the tag firing on every menu and footer link on the page.
A tight trigger keeps your data clean. A loose trigger floods GA4 with noise that you will later have to filter out by hand.
Configure the GA4 event tag
Add a new tag of type GA4 Event. Connect it to your existing GA4 configuration tag. Name the event affiliate_click to match your native setup and keep reporting tidy.
Now pass useful parameters with the event. Send link_url for the destination. Send a custom affiliate_id value pulled from the clicked URL. That ID is the thread that later ties a sale to a single partner.
To grab the ID, create a URL variable in GTM. Point it at the query parameter your links use, such as ref or aff. GTM then reads that value on every qualifying click.
Test with Preview before you trust it
Click Preview in GTM. Open your live site in the debug window that appears. Tap one of your affiliate links like a normal visitor would.
Watch the Tag Assistant panel for the green tag-fired confirmation. Then open GA4 DebugView and confirm the affiliate_click event arrives with its parameters attached. When both agree, you are live.
What I’ve noticed is that teams skip this test and pay for it later. A silent misfire can waste a full month of data before anyone notices the gap.
The UTM naming system that survives a year
Events tell you what happened on your site. UTM parameters tell you where the visitor came from. You need both halves for tracking affiliates in Google Analytics 4 (GA4). Skip the UTMs and your sources turn to mush.
UTMs are just labels added to a link. GA4 reads them on arrival and files the visit under the right source and medium. Good labels in, clean reports out.
How UTMs map to GA4 dimensions
UTM tags attach to the inbound link a partner shares with their audience. GA4 reads them the moment a visitor lands on your page. It then sorts the session into matching dimensions automatically.
Use a flat, boring system on purpose. Three core fields carry most of the weight. Consistency beats cleverness every single time.
utm_source names the partner, for example janedoe_blog. utm_medium stays the word affiliate for this entire channel. utm_campaign names the promotion, for example summer_sale_2026.
A worked example you can copy
Say Jane runs a review blog and joins your program. Her link to your spring sale could read like a simple, readable string.
The base is your product page. Append utm_source equals janedoe_blog, then utm_medium equals affiliate, then utm_campaign equals spring_2026. That one link now reports cleanly for months.
Build a small spreadsheet with one row per partner. Columns for source, medium, campaign, and the final link. It is dull, and that is the point.
The one rule people break
Keep utm_medium identical for every partner. Always the word affiliate. Never a variant.
One typo, like affilate without the second i, splits your channel in two. Your report then shows half the traffic under a phantom source. Totals break, and trust in the data follows.
A clean schema also feeds your other tools. Tapfiliate parameters map to these same GA4 dimensions, so your numbers stay aligned across platforms. See the guide to setting up custom tracking parameters for the exact field mapping.

Capturing affiliate sales and revenue
Clicks are nice. Revenue pays salaries. This is the section where most setups quit too early, and it is exactly where the value hides.
A click count alone cannot tell you which partner is worth a raise. For that, you must carry the partner ID all the way to the sale.
Affiliate ID to cookie to purchase event
The chain has three links, and each one matters. First, read the affiliate ID from the inbound URL the moment the visitor lands on your site.
Second, store that ID inside a first-party cookie. It then waits quietly through the whole visit, even as the reader browses other pages.
Third, when the purchase event finally fires, attach the stored ID as a parameter. The sale now carries its partner name straight into GA4. The loop is closed.
Send revenue with the purchase
Your purchase event should already send a value and a currency. That is standard ecommerce tracking. Add the affiliate_id parameter right beside them.
Then register affiliate_id as a custom dimension in Admin. This step is easy to forget. Without it, GA4 quietly collects the data but refuses to show it in any report.
In my experience, the cookie step is where revenue tracking breaks most often. Test it with one real purchase before you trust a single dollar figure on the dashboard.
A note on consent and privacy
Cookies live under privacy rules now. If your consent banner blocks storage, the affiliate ID may never save. Then the sale arrives with no partner attached.
Build your consent flow so core tracking survives a normal opt-in. Test the full path with consent granted and denied. A blind spot here looks exactly like a partner who sent no sales.
Building the affiliate report in GA4
Data with no report is just storage. The free-form exploration is what turns your raw events into answers a manager can read. This is the payoff for all the setup work.
You do not need a custom dashboard tool. GA4 ships with the explorer you need, hidden one click away.
Use a free-form exploration
Open Explore, then start a blank Free-form report. Drag affiliate_id into the rows slot as your main dimension. Each partner now gets a line of its own.
Add affiliate_click events and purchase revenue into the values area. You now see clicks, sales, and dollars for every partner inside one tidy grid. Those are the three columns you wanted from the start.
Sort the table by revenue, highest first. Your top three partners surface in seconds. Your dead weight becomes just as obvious, which is the harder truth to face.
Turn the report into action
A report is only useful if it changes a decision. Pay your top partners more attention and better terms. Coach the middle. Quietly retire the bottom.
Tapfiliate own breakdown of Google Analytics reports for affiliate sales is a useful companion here. It pairs well with these explorations when you design views for a wider team.
Save the exploration once it works. GA4 keeps it ready for next month with fresh data inside. You build the view once and reuse it forever. That reuse is the quiet reward of tracking affiliates in Google Analytics 4 (GA4).
Share the saved report with finance and your partner team. One agreed view stops three people pulling three different totals. That shared number ends the guessing for good. The alignment alone is worth as much as the data itself, and it costs you nothing extra to set up.
Fix attribution: DDA versus last-click
Here is the setting that hides your money. This is the open loop from the very first screen, now finally closed. Read this section twice if you skim anything.
Attribution decides which channel gets credit for a sale. Change the rule and your whole report shifts. Most teams never touch it, and that is the costly default.
Why the default works against affiliates
GA4 defaults to data-driven attribution, known as DDA, as its standard model. It uses machine learning to split credit across many touchpoints in a journey.
That sounds fair on paper. For affiliates, it often shrinks the credit a partner earns for the very first click. The partner started the journey, yet receives only a sliver of the reward.
So GA4 shows fewer affiliate sales than your network. The network credits the introducer in full. GA4 hands most of the credit to whatever channel closed the deal.
Switch the model and window
Go to Admin, then Attribution Settings. Many affiliate teams switch the reporting model to last-click. That choice lines GA4 up with how networks actually pay commission.
Then widen the conversion window. A reader who buys six days later still owes the credit to the partner who sent them. A narrow window simply erases those slower, thoughtful buyers.
This single change is why your two tabs disagreed all along. GA4 was busy splitting the credit your network handed over in full. Align the rule and the gap shrinks fast.
A quick scenario with numbers
Picture 100 sales that a partner introduced. Under DDA, GA4 might credit that partner with only 40 of them. The other 60 scatter across search and direct.
Switch to last-click with a sensible window. Now GA4 credits closer to 85 of those sales to the partner. Suddenly the channel looks as valuable as it truly is.

How to track affiliates with Tapfiliate (the GA4 alternative)
Now the pivot, and the honest part. GA4 was built to measure your marketing, not to run a partner program. It counts behavior beautifully. It does not pay commissions, manage partners, or stop fraud.
That is not a flaw. It is simply the wrong tool stretched past its job. Once your program grows real partners and real payouts, a dedicated platform becomes the cleaner answer.
Here is how tracking affiliates works with Tapfiliate instead of, or alongside, GA4. The contrast makes the trade-offs clear.
Why a dedicated platform earns its keep
GA4 cannot tell a partner what they earned this month. It has no commission rules. It has no payout ledger. It has no partner login where affiliates check their own stats.
Those gaps grow expensive as you scale. You end up exporting spreadsheets and reconciling by hand at month end. A platform built for the job removes that grind entirely.
Tapfiliate exists for exactly this work. It tracks the click, the conversion, and the commission in one place. No cookie surgery, no custom dimensions, no fragile scripts to maintain.
Step 1: Install the tracking code
Add one JavaScript snippet to your site, much like the GA4 tag you already use. A WordPress, Shopify, or fully custom store all accept it without fuss.
The snippet drops a first-party cookie on its own. It records the referring affiliate the instant a visitor arrives. The ID capture you had to script in GTM now happens for free.
Step 2: Generate affiliate links
Inside the dashboard, every partner gets a unique referral link and code. There is no spreadsheet of UTM strings to build and babysit by hand.
Partners simply share their link and start sending traffic. The platform reads the code on arrival and files each click under the right affiliate. The manual labeling problem disappears.
Step 3: See clicks, conversions, and revenue per partner
A single dashboard shows clicks, leads, sales, and owed commission for each affiliate. The figures match exactly what partners see inside their own login.
That shared source of truth ends the Monday-morning argument for good. Both tabs finally agree, because both read the same ledger. For a deeper setup walk-through, see the guide to affiliate conversion tracking.
GA4 versus Tapfiliate at a glance
Use the table below as a quick gut check. It is not about one winning. It is about using each tool for the job it was designed to do.
| Job | GA4 | Tapfiliate |
| Track affiliate clicks | Yes (setup needed) | Yes (built in) |
| Track sales per partner | Manual cookie + dimension | Automatic |
| Calculate commission | No | Yes |
| Pay partners | No | Yes |
| Fraud checks | No | Yes |
For the full method comparison, read the affiliate marketing tracking methods guide. It helps you pick the right mix for your stage of growth.

You do not have to choose only one
Many strong programs run both tools together. GA4 watches on-site behavior and content performance. Tapfiliate runs the partner economy that GA4 was never designed to handle.
That pairing gives you the best of both views. Behavior on one screen, commissions on the other. No more reconciling two stories that were never meant to match.
Five mistakes that break affiliate tracking in GA4
Most broken setups fail in the same handful of ways. Knowing them early saves weeks of bad data. Tracking affiliates in Google Analytics 4 (GA4) is forgiving once you sidestep these traps.
Mistake 1: leaving the default attribution model
This is the big one we already met. The data-driven default quietly starves your affiliate channel of credit. Set the model on purpose, not by accident.
Mistake 2: inconsistent UTM mediums
A stray spelling of the medium field splits one channel into two. Your partner totals then scatter across phantom sources. Lock the word affiliate and never improvise it.
Mistake 3: counting clicks but never sales
A click count feels productive, yet it pays no bills. Carry the affiliate ID into the purchase event or you measure only half the story. Revenue is the metric that decides budgets.
Mistake 4: forgetting the custom dimension
You can send affiliate_id with every sale and still see nothing. GA4 hides unregistered parameters from reports. Register the dimension in Admin, then wait a day for data to populate.
Mistake 5: trusting a setup you never tested
A tag that misfires looks identical to a partner who sent no traffic. Always run GTM Preview and check DebugView. Tracking affiliates in Google Analytics 4 (GA4) only works when the events actually arrive.
How to audit your own setup
Run a quick self-check each quarter. Click a live affiliate link yourself and confirm the event lands. Make one test purchase and confirm the partner ID rides along with it.
Then compare your GA4 affiliate total against the network for the same week. A small gap is normal. A huge gap means a setting or a tag needs another look.
Tracking affiliates in GA4: the quick takeaways
Tracking affiliates in Google Analytics 4 (GA4) is fully doable, and worth doing, once you respect its limits. The tool is generous with behavior data and silent on commissions.
Start with Enhanced Measurement for fast outbound clicks. Move to GTM when you need precise rules and an affiliate ID. Fix the attribution model and conversion window before you trust any total. Add a dedicated platform once commissions and payouts enter the picture. None of these steps demand code beyond a single snippet. They demand patience and one honest test of the full path.
Do those four things and your two tabs will finally tell the same story. That is the whole game. Done right, tracking affiliates in Google Analytics 4 (GA4) turns a monthly argument into a quiet, trusted number.
FAQ
How do I track affiliate links in GA4?
Turn on Enhanced Measurement to capture outbound clicks first. Then create a custom event named affiliate_click that fires when a click URL contains your affiliate path. For tighter control, build the same event in Google Tag Manager and pass an affiliate ID parameter with it.
Can GA4 track affiliate sales and revenue?
Yes, but it takes setup. Read the affiliate ID from the URL and store it in a first-party cookie. Then attach it to the GA4 purchase event with the sale value. Register the ID as a custom dimension so revenue shows per partner.
Why does GA4 attribution differ from my affiliate network?
GA4 defaults to data-driven attribution and spreads credit across many touchpoints. Networks usually credit the referring partner in full. Switching GA4 to last-click and widening the conversion window brings the two numbers much closer together.
Do I need Google Tag Manager to track affiliates?
No, not to begin. Native GA4 Enhanced Measurement and a custom event cover basic click tracking well. Google Tag Manager helps when you want custom parameters or an affiliate ID. It also lets rules fire on specific links instead of every outbound click.
Is GA4 enough, or do I need an affiliate platform?
GA4 measures clicks and behavior well. It cannot calculate commissions, manage partners, or pay them. Once your program has real partners and payouts, a dedicated platform like Tapfiliate runs that economy. GA4 keeps watching site behavior alongside it.
Sign up for Tapfiliate’s free trial to start tracking your affiliate marketing results ❤️