
How to Track Outbound Link Clicks in GA4
Every link that sends a visitor away from your site — a partner page, a social profile, an affiliate offer — is a small but measurable decision point. GA4 tracks these automatically out of the box, but the default implementation is fairly generic. If outbound clicks matter to your business (affiliate revenue, partner referrals, app store links), it's worth understanding both the automatic tracking and how to build a more detailed custom version.
How Automatic Outbound Click Tracking Works
GA4's Enhanced Measurement includes outbound click tracking by default. It fires a click event whenever a user clicks a link pointing to a domain different from the one they're currently on, with these parameters:
link_classes— the CSS classes on the link elementlink_domain— the destination domainlink_id— the element'sidattribute, if presentlink_url— the full destination URLoutbound—truefor external links
You can confirm this is working by checking Admin → DebugView and clicking any external link on your site — you should see a click event with outbound: true appear immediately.
Where to See Outbound Clicks in Reports
- Go to Reports → Engagement → Events.
- Find
clickin the event list and click into it. - Add the Link URL or Link domain dimension to break down which destinations get the most outbound clicks.
For a deeper breakdown, build a free-form Exploration with Link domain and Link URL as dimensions and Event count as the metric, filtered to Event name = click.
Building a Custom Outbound Click Event
The automatic event is useful for a general sense of where people go, but if outbound clicks represent real business value (an affiliate link, a partner referral you get paid for), a custom event with more specific parameters is worth the extra implementation:
document.addEventListener("click", (e) => {
const link = e.target.closest("a");
if (!link) return;
const isExternal = link.hostname !== window.location.hostname;
if (!isExternal) return;
gtag("event", "outbound_click", {
link_url: link.href,
link_domain: link.hostname,
link_text: link.textContent.trim(),
link_category: link.dataset.linkCategory || "uncategorized",
});
});
Adding a data-link-category attribute to specific links in your markup lets you tag business-relevant categories directly:
<a href="https://partner-site.com" data-link-category="partner-referral">
Visit Our Partner
</a>
This turns a generic outbound click into something you can filter and report on by category — "partner-referral" clicks versus general external links — which the default Enhanced Measurement event can't distinguish on its own.
Implementing via Google Tag Manager
If you manage tags through GTM rather than inline scripts, use a Just Links trigger:
- Create a new trigger: Click - Just Links.
- Under This trigger fires on, choose Some Link Clicks.
- Add a condition:
Click URLdoes not contain your own domain. - Create a GA4 Event tag named
outbound_click, firing on this trigger. - Map event parameters like
link_urlto{{Click URL}}andlink_textto{{Click Text}}(built-in GTM variables — enable them under Variables → Configure if not already active).
This avoids writing any custom JavaScript at all, which is often preferable for teams managing tracking primarily through GTM.
Marking High-Value Outbound Clicks as Conversions
If a specific outbound link genuinely represents revenue or a meaningful referral — an affiliate link, a partner signup URL — mark the corresponding event as a conversion:
- Ensure the event (whether the automatic
clickevent filtered by a specificlink_url, or your customoutbound_clickevent) has fired at least once. - Go to Admin → Events, find it, and toggle Mark as conversion.
Since the default click event covers all outbound clicks together, most teams find it cleaner to build a dedicated custom event (like outbound_click or affiliate_click) specifically for the links they care about, rather than trying to isolate one URL out of a shared generic event.
Common Pitfalls
- Double-counting — if you build a custom outbound click event, make sure it doesn't fire alongside the Enhanced Measurement
clickevent without you realizing both exist; that's fine for reporting purposes as long as you know which one you're analyzing, but it can be confusing if you forget the automatic event is still active. - Missing the domain-comparison edge case — subdomains (
shop.yoursite.comlinking toyoursite.com) are technically the same top-level domain but different hostnames; decide up front whether that counts as "outbound" for your purposes and adjust your comparison logic accordingly. - Not testing single-page applications — client-side routed links that don't trigger a full navigation event can behave differently; verify in DebugView specifically within your app's actual navigation flow.
Reporting on Outbound Clicks Alongside Conversions
Outbound clicks are rarely the final goal themselves — they're usually a step toward something else, like an affiliate sale that happens on the destination site and gets reported back separately. Because of that, it's worth building a simple Exploration that puts outbound click data next to your actual conversion data, even though they technically live in different systems:
- Build a free-form Exploration with
Link domainas a dimension andEvent countas a metric, filtered to your outbound click event. - Separately, track affiliate or partner conversions reported back to you (via a spreadsheet, a partner dashboard, or a postback URL) for the same date range.
- Compare the two manually to get a rough sense of click-to-conversion efficiency by partner, even without a fully unified tracking pipeline.
This kind of manual cross-referencing isn't as elegant as a single unified funnel, but for most sites it's a perfectly reasonable way to judge whether a given outbound relationship is actually worth the placement it's getting on your site.
Auditing Outbound Links Periodically
Especially on content-heavy sites, outbound links accumulate over time — old partner links, dead affiliate programs, broken URLs. Periodically pulling a report of all outbound link destinations and their click volume is a useful way to catch links that are either broken (worth fixing) or pointing at defunct partnerships (worth removing), both of which are easy to lose track of on a site with more than a handful of pages.
FAQ about Tracking Outbound Link Clicks in GA4

Does GA4 track outbound clicks without any setup?
Yes, as long as Enhanced Measurement is enabled (it is by default on new data streams) — outbound click tracking requires no configuration to start working.
Can I see which specific outbound links get the most clicks?
Yes — use the Events report filtered to click, or a free-form Exploration with the Link URL dimension, to break down clicks by destination.
How do I track clicks on a specific button that isn't a link element?
Enhanced Measurement only tracks <a> elements. For a button or other non-link element, you'll need a custom event with an explicit click listener, similar to the outbound link example above.
Is there a way to track outbound clicks by category, like "social" vs. "partner"?
Yes — tag your links with a custom data- attribute (like data-link-category) and read it into a custom event's parameters, since the default automatic event doesn't include a category concept.
Do outbound clicks count as conversions by default?
No — the automatic click event isn't pre-marked as a conversion. You'd need to mark it manually, though most teams prefer a dedicated custom event for conversion-worthy outbound links instead.
Will tracking outbound clicks slow down navigation to the destination site?
Not meaningfully if implemented correctly — GA4's event calls are asynchronous and don't block the browser's navigation to the link's destination.
Conclusion
Outbound clicks are one of the easiest wins in Google Analytics, since GA4 tracks them automatically the moment Enhanced Measurement is on. For general visibility, the default event is enough — but when outbound clicks represent real business value, a small custom event with proper categorization turns generic click data into something you can actually report against on your website.


