To track affiliate clicks in GA4, turn on enhanced measurement’s Outbound clicks option, then create a custom affiliate_click event from the click event where link_url matches your affiliate links and mark it as a key event. GA4 will then show which pages and traffic sources send the most affiliate clicks, but not the sales, which you still check in your affiliate dashboards.
Short answer: GA4 records an outbound click event called click, with link_url and link_domain parameters, whenever someone clicks a link to another domain, as long as enhanced measurement is on. Create a new event named affiliate_click where event_name equals click and link_url contains your affiliate link pattern, then mark it as a key event. Cloaked links on your own domain need a Google Tag Manager click trigger instead.
Key takeaways
- No code needed for links that go to another domain: Outbound clicks is part of GA4 enhanced measurement.
- The event is called click and carries link_url, link_domain, link_classes, link_id and outbound.
- Make it a key event by creating affiliate_click from click in Admin > Data display > Events.
- New events are not retroactive. Google says created events do not apply to historical data and take an hour or more to start.
- Cloaked links on your own domain (like /go/ or /recommends/) are not outbound, so use a Tag Manager Just Links trigger.
- GA4 sees clicks, not sales. Commissions stay in your network or program reports.
In this guide
- Can GA4 track affiliate link clicks?
- How do you turn on outbound click tracking in GA4?
- Where do you see affiliate clicks in GA4?
- How do you create an affiliate_click key event?
- How do you track cloaked affiliate links in GA4?
- What GA4 cannot tell you about affiliate sales
- Track affiliate clicks in GA4 FAQs

Can GA4 track affiliate link clicks?
Yes. GA4 can track every click on an affiliate link that leads to another domain, through the Outbound clicks option in enhanced measurement. According to Google’s enhanced measurement documentation, the click event fires “each time a user clicks a link that leads away from the current domain,” and links to domains set up for cross-domain measurement are excluded.

| Parameter | What it holds | Useful for |
|---|---|---|
| link_url | The full URL that was clicked | Matching your affiliate links |
| link_domain | The domain of the clicked link | Grouping clicks by merchant or network |
| link_classes | CSS classes on the link | Telling buttons apart from text links |
| link_id | The HTML id of the link | Tracking one specific button |
| outbound | True for outbound links | Filtering out internal clicks |
Google says these parameters fill the Link URL, Link domain, Link classes, Link ID and Outbound dimensions, so you can use them in reports and explorations.
How do you turn on outbound click tracking in GA4?
Outbound click tracking is on by default when enhanced measurement is on. To check it:
- In GA4, open Admin.
- Under Data collection and modification, click Data streams, then click your web stream.
- Under Enhanced measurement, make sure the switch is on.
- Click the settings icon and confirm Outbound clicks is enabled.
Click one of your own affiliate links, then open Reports > Realtime. Google says the Event count by Event name card shows events from the last 30 minutes, so you should see click appear.
Where do you see affiliate clicks in GA4?
Go to Reports > Engagement > Events and click the click event to see totals. For a page-by-page view, build a free-form exploration:
- Open Explore and start a Free form exploration.
- Add the dimensions Event name, Link URL, Link domain and Page location.
- Add the metric Event count.
- Filter Event name exactly matches click.
- Put Page location in rows and Link domain in columns to see which posts send clicks to which merchants.
Add Session source / medium to see which channels bring readers who click. If you tag your newsletter and social links with UTM parameters, the channels will be much cleaner. My guide to UTM parameters for affiliate links shows how.
How do you create an affiliate_click key event?
The plain click event counts every outbound link, including links to sources, social profiles and tools you do not earn from. Create a separate affiliate_click event so you can count only affiliate clicks and mark them as a key event.

- In Admin, under Data display, click Events.
- Click Create event, then Create.
- Name the custom event affiliate_click.
- Add the matching condition event_name equals click.
- Add a second condition: link_url contains your affiliate pattern, such as your redirect domain or a network’s tracking domain. Use more than one event if you have several patterns, or a regular expression.
- Leave Copy parameters from the source event on, so link_url and page data come along.
- Click Create, then mark affiliate_click as a key event on the Key events tab.
Google says you need the Editor role or above on the property to see the Create event button. Google also notes that you can create up to 50 events this way, that modified and new events “do not apply to historical data,” and that “an hour or more passes before modifications take effect.” Start this setup before you need the numbers.
How do you track cloaked affiliate links in GA4?
If your affiliate links are cloaked on your own domain, such as yoursite.com/go/product, the outbound click event will not fire, because the click does not lead away from your domain. The redirect to the merchant happens after the click.
Use Google Tag Manager instead:
- Create a trigger of type Click – Just Links.
- Set it to fire on Some Link Clicks where Click URL contains /go/ (or your own cloaking prefix).
- Create a Google Analytics: GA4 Event tag named affiliate_click, and send the Click URL as a parameter.
- Preview, test a click, then publish the container.
Google’s Tag Manager help explains that the Just Links trigger tracks clicks on HTML links and lets you add conditions such as “Click URL contains.” If you would rather not maintain this yourself, a dedicated click tracker handles it; compare options in my list of the best link tracker software.
What GA4 cannot tell you about affiliate sales
GA4 sees what happens on your site, and the sale happens on the merchant’s site. So GA4 can show:
- which posts and buttons get affiliate clicks,
- which channels and campaigns bring readers who click, and
- click-through rate from a page to a merchant.
It cannot show commissions, refunds or which click turned into a sale. For that, use your network’s reports with sub IDs, or Amazon tracking IDs, as explained in my guides to dynamic sub ID affiliate tracking and tracking affiliate links for free. To see where the two sets of numbers meet, read my ClickMagick vs Google Analytics comparison.
Once you know your click counts, estimate earnings with my free Affiliate Earnings and Break-Even Planner.
Track affiliate clicks in GA4 FAQs
Does GA4 track outbound clicks automatically?
Yes, when enhanced measurement is on. GA4 sends a click event each time someone clicks a link that leads away from your domain.
What is the event name for outbound clicks in GA4?
The event is named click, and it carries the link_url, link_domain, link_classes, link_id and outbound parameters.
Can GA4 track affiliate sales?
No. GA4 can track the click on your site, but the purchase happens on the merchant’s site, so sales and commissions stay in your affiliate network reports.
Why are my cloaked affiliate links not showing as outbound clicks?
Cloaked links on your own domain, like /go/ links, do not lead away from your domain when clicked, so GA4 does not count them as outbound. Use a Google Tag Manager Just Links trigger to track them.
Will a new affiliate_click event show past clicks?
No. Google says created and modified events do not apply to historical data, and they take an hour or more to start working.
How many custom events can I create from existing events in GA4?
Google says you can modify up to 50 existing events and create up to 50 events based on existing events.
How do I check that affiliate click tracking works?
Click one of your affiliate links, then open the Realtime report. The Event count by Event name card shows events from the last 30 minutes.
Final thoughts
Tracking affiliate clicks in GA4 takes a few minutes: make sure Outbound clicks is on, create an affiliate_click event from click, and mark it as a key event. Use Tag Manager for cloaked links, and keep reading your network dashboards for sales. Your next step: create the affiliate_click event today so you have clean click data by next week.
Sources: Google Analytics Help on enhanced measurement events, rename and generate new events and create or modify key events, and Tag Manager Help on the click trigger.

