How To Track Affiliate Clicks in GA4: Outbound Click Setup (2026)

This post contains affiliate links. If you buy through one, I may earn a commission at no extra cost to you. I only recommend tools I believe are useful. Read my disclosure.

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.
Laptop showing an analytics dashboard used to track affiliate clicks in GA4

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.

What GA4 can and cannot see in an affiliate sale: visit, outbound click, merchant purchase
GA4 sees the visit and the outbound click. The purchase happens on the merchant’s site.
ParameterWhat it holdsUseful for
link_urlThe full URL that was clickedMatching your affiliate links
link_domainThe domain of the clicked linkGrouping clicks by merchant or network
link_classesCSS classes on the linkTelling buttons apart from text links
link_idThe HTML id of the linkTracking one specific button
outboundTrue for outbound linksFiltering 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:

  1. In GA4, open Admin.
  2. Under Data collection and modification, click Data streams, then click your web stream.
  3. Under Enhanced measurement, make sure the switch is on.
  4. 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.

Analytics Mania shows how to track affiliate link clicks with Google Analytics 4.

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:

  1. Open Explore and start a Free form exploration.
  2. Add the dimensions Event name, Link URL, Link domain and Page location.
  3. Add the metric Event count.
  4. Filter Event name exactly matches click.
  5. 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.

GA4 create event settings for an affiliate_click event based on the click event and link_url
The settings for an affiliate_click event created from GA4’s click event.
  1. In Admin, under Data display, click Events.
  2. Click Create event, then Create.
  3. Name the custom event affiliate_click.
  4. Add the matching condition event_name equals click.
  5. 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.
  6. Leave Copy parameters from the source event on, so link_url and page data come along.
  7. 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.

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:

  1. Create a trigger of type Click – Just Links.
  2. Set it to fire on Some Link Clicks where Click URL contains /go/ (or your own cloaking prefix).
  3. Create a Google Analytics: GA4 Event tag named affiliate_click, and send the Click URL as a parameter.
  4. 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.

MeasureSchool walks through tracking affiliate links with GA4.

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.

David Sandy Ebook Trilogy Books

Get All 3 Of My Ebooks... For Free!

>
0 Shares
Share
Tweet
Pin