How do I track outbound link clicks in GA4?

Applies to: Google Analytics 4 (GA4)
Last updated: May 2025


Problem

You want to track when users click on links that lead to external websites, such as social media profiles, partner pages, or third-party resources.


Solution

GA4 includes built-in tracking for outbound link clicks through the Enhanced Measurement feature. This automatically sends a click event when users click a link that navigates away from your domain. For more advanced tracking, such as specific link categories or custom events, use Google Tag Manager (GTM).


Option 1: Use Enhanced Measurement (Automatic Tracking)

Step 1: Confirm Enhanced Measurement is Enabled

  1. Go to https://analytics.google.com
  2. Select your GA4 property
  3. Click Admin > Data Streams > Web
  4. Under your web stream, click Configure tag settings
  5. Click Enhanced Measurement
  6. Make sure the Outbound Clicks toggle is turned on

When enabled, GA4 automatically tracks outbound link clicks as click events.


Step 2: View Outbound Click Data in Reports

  • Go to Reports > Engagement > Events
  • Look for the click event
  • Click into the event to analyze dimensions like:
    • link_url (the full destination URL)
    • link_domain (the domain only)

Use Explorations to break this down further by page, device, or traffic source.


Option 2: Custom Outbound Link Tracking via GTM (Optional)

Use this if you want more control over what qualifies as an outbound link.

Step 1: Set Up a Click Trigger

  1. In GTM, go to Triggers > New
  2. Choose Click – Just Links
  3. Check Wait for Tags and Check Validation
  4. Set Trigger Conditions like:
    • Click URL does not contain yourdomain.com
    • OR use a regex pattern to define external domains

Step 2: Create a GA4 Event Tag

  1. Go to Tags > New
  2. Choose Google Analytics: GA4 Event
  3. Set:
    • Event name: outbound_click
    • Parameters:
      • link_url: {{Click URL}}
      • page_path: {{Page Path}}
  4. Attach the outbound click trigger
  5. Save and publish

Optional: Register Parameters

To use link_url or link_domain in reports:

  • Go to Admin > Custom Definitions
  • Create a custom dimension with:
    • Name: Link URL
    • Scope: Event
    • Parameter: link_url

Notes

  • Enhanced Measurement tracks outbound clicks to non-matching domains
  • Custom GTM setup is useful for filtering by link type, class, or section
  • Avoid using outbound click tracking for affiliate links using redirects unless the actual destination is exposed