How to Track External Links in Google Analytics

Cody Schneider8 min read

Ever wonder what happens after someone clicks away from your site? You meticulously add affiliate links, citevaluable sources, and link out to partners, but it can feel like shouting into the void unless you know which links people are actuallyclicking. This guide will show you exactly how to track those external link clicks inside Google Analytics 4, so you can stop guessing and start measuring.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Bother Tracking External Links?

Tracking outbound clicks isn't just a vanity metric, it’s a direct window into your user's behavior and intent. When you know which external links are popular, you can answer important questions about your business, such as:

  • Affiliate performance: Are people actually clicking on your B&H, Amazon, or other affiliate links? Knowing this is the first step to optimizing your affiliate income.
  • Partnership value: If you promote a partner's webinar or product, tracking clicks helps you prove the value of the traffic you're sending their way.
  • User engagement: What resources do your visitors find most valuable? Clicks on links to external articles, tools, or references show what content genuinely helps them.
  • Site improvements: If users are frequently clicking a link to an external tool to solve a problem your site doesn’t, maybe that’s a feature you should consider building.

In short, understanding this behavior helps you create better content, build stronger partnerships, and improve your monetization strategy.

Good News: GA4 Makes This Easy

If you have memories of adding complicated bits of code just to track outbound links in the old Universal Analytics, you can relax. Google Analytics 4 comes with "Enhanced Measurement," a built-in feature that can automatically track these clicks for you right out of the box. For most people, this is all you’ll need.

Let’s start with the easiest method: checking to see if this feature is already working for you.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 1: Enabling and Using GA4’s Default Outbound Click Tracking

Enhanced Measurement in GA4 simplifies tracking several common user interactions without you having to touch a line of code or deal with Google Tag Manager. Outbound clicks are one of them.

How to Check if Outbound Click Tracking Is On

First, let’s confirm this feature is enabled in your GA4 property. The odds are good that it is, but it's always smart to check.

  1. Navigate to the Admin section of your Google Analytics dashboard (the gear icon in the bottom-left corner).
  2. In the Property column, click on Data Streams.
  3. Select the web data stream for your website. It's usually your site's domain name.
  4. In the Events section, you'll see a section called Enhanced measurement. Make sure the toggle is switched on.
  5. Click the small gear icon on the right to see the details. A list of engagement metrics will appear. Ensure that Outbound clicks has a checkmark next to it.

If it was already on, great! GA4 has been collecting this data for you all along. If not, toggle it on now, save your changes, and GA4 will start tracking these clicks going forward.

Where to See Your Outbound Click Data in GA4

Once tracking is active, GA4 records an event named click every time a user clicks a link that leads them away from your website. Here's how to find the report for it:

  1. From the left-hand navigation, go to Reports.
  2. Under the Life cycle collection, open the Engagement report, then click on Events.
  3. Look for an event named “click” in the list and click on it. If you don't see it, it may be because no one has clicked an external link since you enabled tracking.

Just knowing how many click events happened isn’t very useful by itself. You need to know which specific URLs people are clicking on. GA4 collects this detail through event parameters.

To view the clicked URLs:

  • On the click event report you're viewing, look for a card titled Link URL. This will show you a list of the specific external links that were clicked.
  • You can also click the small blue "+" button above the table to add a secondary dimension. Search for and select "Link URL" to see a breakdown of which pages on your site are sending clicks to which external URLs.

GA4 captures several helpful parameters for each click event automatically, including link_url, link_domain, and link_text, helping you see the full context of the click.

For 80% of users, this default setup is perfect. It’s simple, automatic, and gives you the core data you need. However, if you want more control, Google Tag Manager is the way to go.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Custom External Link Tracking with Google Tag Manager

Using Google Tag Manager (GTM) gives you more power and flexibility. This approach is for you if you want to:

  • Give your event a more descriptive name (e.g., affiliate_click instead of the generic click).
  • Track additional custom information with each click.
  • Avoid potential conflicts if the word click is used for other custom events.

Before you start, if you plan to use this method, you should go back into your GA4 Data Stream settings and disable the Outbound clicks tracking under Enhanced Measurement. This will prevent you from tracking every external click twice - once automatically and once through GTM.

Sound good? Let's build your new tracking system in GTM.

Step 1: Enable Click Variables

First, make sure GTM is listening for all the different data points related to a click.

  1. Inside your GTM container, go to the Variables tab on the left.
  2. Under the Built-In Variables section, click Configure.
  3. Scroll down to the Clicks section and check the boxes for all variables like Click URL, Click Text, and Click Classes. This makes data like the clicked URL and the link's anchor text available for you to use in your tags and triggers.

Step 2: Create a Trigger

The trigger tells GTM when to fire your tag. In this case, we want it to fire only when someone clicks a link that leads to a different website.

  1. Navigate to the Triggers tab and click New.
  2. Name your trigger something clear, like "TRG - External Link Clicks."
  3. Click into Trigger Configuration and choose the Just Links trigger type under the Click section.
  4. Select the option for the trigger to fire on Some Link Clicks.
  5. Now set the condition for it to fire:
  6. Save your trigger.

This trigger will now activate for any link click that doesn’t point to your own domain.

Step 3: Create the GA4 Event Tag

The tag is what sends the actual data to Google Analytics when the trigger fires.

  1. Navigate to the Tags tab and click New.
  2. Name your tag something descriptive, like "GA4 Event - External Link Click."
  3. Click into Tag Configuration and select Google Analytics: GA4 Event.
  4. Select your main GA4 Configuration Tag from the dropdown list. (If you don't have one, you'll need to set it up first with your Measurement ID).
  5. In the Event Name field, give your event a custom name. Let's use external_link_click for this example.
  6. Expand the Event Parameters section and add two rows:
  7. Under Triggering, select the "TRG - External Link Clicks" you just created.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 4: Register Custom Dimensions in GA4

Now that your event with its custom properties is ready to go, we just have to do one more thing. Although GA4 will automatically begin collecting your two event parameters - link_url and link_text - you won't be able to actually use them in your analysis until you let GA4 know what to do with them.

  1. Go to the Admin section of your GA4 account.
  2. Under the Property column, click on Custom Definitions.
  3. Click on Create Custom Dimensions, and choose the parameters to base your dimensions on, such as link_url and link_text.
  4. Click Save.
  5. Repeat the process to add your second parameter link_text.

You now have these new tracking options available for use in your explorations and data analysis, providing insights into your user interactions.

Step 5: Review, Test, and Publish

Before making your changes live, ensure everything is firing correctly with GTM's Preview mode.

  1. Click the Preview button in the upper right of your GTM container.
  2. Enter your website's URL into the form that appears, allowing the Tag Assistant to communicate with your site.
  3. Your website will now open in a new tab. Click any external link on your site and watch as the tag 'GA4 Event - External Link Click' fires in your Tag Assistant console window.

Once you’ve confirmed everything looks good, you can go back to GTM, hit the Submit button, and Publish your changes to set your new tracking live.

Final Thoughts

Tracking external links tells you what your audience values and provides crucial data for your affiliate and partnership strategies. Google Analytics 4 offers a fantastic, built-in solution that works perfectly for most users, while Google Tag Manager provides a path for deeper customization and control for those who need it.

Of course, tracking events is just the first step. To get real answers, you still have to dig through reports to find out which links are performing best. This is exactly where we can help. Instead of filtering through GA4 reports, Graphed allows you to connect your data and just ask questions in plain English - like "Which of my affiliate links got the most clicks last month?" - and get an instant, easy-to-read visualization. It shifts your focus from wrestling with reports to acting on insights.

Related Articles