How To Track Outbound Clicks In Google Analytics 4

how to track outbound clicks in google analytics 4
how to track outbound clicks in google analytics 4

Knowing how to track outbound clicks in Google Analytics 4 isn’t going to win you a promotion, but it will certainly aid in making you a better product manager. Suffer along with us as we set up Google Analytics 4 to track outbound clicks on this very website.   If you want a deeper dive, consider reading “What is GA4?” to get some better context for this article.

How To Track Outbound Clicks in Google Analytics 4: Setting Things Up

What Does Outbound Click track?

Clicks damn it! Clicks! Oh so you want to know a little bit more than that.

OK, fine.
When a user clicks on a link that takes them away from a domain, that is considered an outbound click. 

As Google Analytics 4 tracks everything as Events, you can provide more context to these events by making use of parameters, which in the case of an Outbound click event, include the following automatically tracked parameters

  • link_classes – This captures the HMTL (CSS) class name of the link that was clicked
  • link_domain – This captures the domain name of the outbound click
  • link_id – This captures the CSS id of the link
  • link_url – This captures the URL of the outbound link
  • outbound (boolean) – This is set to “true” to indicate that the link was outbound

Be Patient

When you install Google Analytics 4 on a website, you will need to wait for up to 24 hours to start seeing data in non-real-time reports.

Enable Enhanced Measurement

When you set up your account, make sure you enable “Enhanced Measurement, as seen in the image below.

What is GA4 - Enhanced measurement
Take that entitled software developer!! GA4 Enhanced measurement allows for more data capture with less development work.

Finding Click Events

So next up in the adventure we call knowing how to track outbound clicks in Google Analytics 4 is finding the reports. 

Using the image below as a guide, you can find the event counts by going to Reports (fuchsia box) > Engagement (red box) > Events (green box).  Then in event list, look for the “click” event (purple box).

how to track outbound clicks in Google Analytics 4 - find the report
How to find the click event report.
And with a click of the “click” link, all of the outbound click data is at your finger tips, just look a the image below.
How to track clicks in GA4
Wait, where is all the data?

What the fuck? Where is the data? I thought all this stuff was supposed to be automatic? 

So, surprise surprise, there is actually a bit of configuration work to do if you want to find out what outbound links were clicked.

How To Track Outbound Clicks in Google Analytics 4: Configuring Custom Dimensions

Even though GA4 is automatically tracking the URLs that were clicked, they are not available in the reports unless you do additional configuration. You must tell GA4 that you want to start seeing Link URLs in the reports. 

Do this by clicking the following items in the interface as seen in the image below: Configure (Red box) > Custom Definitions (Orange box) > Create Custom Dimensions (Blue box). 

Configuring Custom Dimensions - click tracking
What, you mean I need to do some work to configure click tracking....geez.
After you click the “Create Custom Dimensions, you should see something that looks like the image below:
Click tracking - custom dimension configuration
Remember to configure the custom dimension for click tracking as you see above.

In the form above you need to fill out the form as follows

Dimension Name:  This is what shows up in your reports.

Description: Optional but fill it out anyways to add additional context.

Scope:  Make sure event is selected.

Event Parameter: Select “link_url” from the drop down.   Please note that this event parameter does process past data,  only new data from the moment you created the custom dimension

Click tracking - Custom dimension
Once you configure the custom dimension properly, you should see something that looks like this.
And now we wait for the next day (and click a bunch of links to generate data) . After that, you will be able to use that Outbound Link URL custom dimension in your GA4 reports.

Click Tracking In Real Time

You can view some click tracking data in real time.  From the Real Time Overview view, scroll down and locate the “Event Count” section.  In the image below we’ve outlined “Events” in blue and the “click” event is in red.

Events in GA4
Locating the real time click event in the GA4 interface.
Event Parameters
Click on the link_url to see what link was clicked.
how to track outbound clicks in google analytics 4 -Link url
Finally, you get to see the outbound links that were clicked.
More From Our Blog
Challenges of Building Product Roadmaps
Opportunity Identification
Product Roadmap Challenges

Ask a product managers to rank order their most vexing professional issues, it’s pretty certain product roadmap challenges are going to bubble to the top

Read More »
The Product Road Map Process
Opportunity Identification
The Product Roadmap Process

To the uninitiated or junior product manager, just starting out in the field, the product roadmap process is a seemingly mechanical process.  What are we going

Read More »