google analytics link click tracking

Google Analytics Link Click Tracking: How to Set Up in 2022

Google Analytics does not track link clicks by default. For link click tracking we need to bring in the help of Google Tag Manager (GTM) and pair it up with Google Analytics. The process for Google Analytics link click tracking is different in UA (Universal Analytics) vs. the new GA4. We’ll review the process for both property types in this blog. We also have video tutorials if you want to follow along.

This is a blog about tracking links on your website. If you are interested in tracking links from other places TO your website (like your Google business listing, email campaigns, paid media, and others) you’re want to learn about UTM parameters. If that sounds like you, here is a guide to UTM parameters for Google business listings. Assuming you’re in the right place for link click tracking, read on below.

Link Click Tracking Guide Summary

  • Link click tracking allows you to see which links are being clicked on your website. You can track both link clicks within your site (internal links) and links off of your site (external links).
  • The process for setting up link click tracking is different for Universal Analytics (UA) compared to Google Analytics 4 (GA4).
  • For Universal Analytics, you will need to set up event tracking in Google Tag Manager to track both internal and external link clicks. This requires the use of a tag and a trigger. Part of this process involves configuring your event parameters for your tag to set the data that will flow into your linked Universal Analytics property.
  • For Google Analytics 4, external link clicks are one of the “enhanced measurement events” that GA4 can track for you automatically. However, you will need to set up event tracking in Google Tag Manager to track both internal link clicks. This requires the use of a tag and a trigger. Part of this process involves configuring your event parameters for your tag to set the data that will flow into your linked Universal Analytics property.
  • For GA4, you also need to register your event parameters as custom dimensions so you can see the parameter data in your reports.

We’ll review Universal Analytics link click tracking first. If you’re only focused on GA4, click here to skip down to that section of the blog.

The Link Click Tracking Ingredients You Will Need

Before we get started, let’s make sure we have all the elements necessary. We’ll need Google Analytics and Google Tag Manager. If you are using both UA and GA4 (the first recommendation on our list of 7 things you should be doing with Google Analytics in 2022), you’ll need both UA and GA4 property codes deployed on your site. If you’re using only one property type or the other, obviously follow the instructions for the correct property type.

Google Analytics

We’ll be working with the Universal Analytics (UA) property type and / or the GA4 property type. As of 2022, GA4 will track your external links without the additional help of Google Tag Manager (GTM). However, you’ll need GTM  to track internal link clicks. For UA, you’ll need to set up event tracking with GTM for both UA and GA4. And the link click tracking data is easier to see in UA than GA4. That’s one of many reasons, UA still makes a lot of sense if you’re considering GA4 vs. UA (reminder: use both).

google analytics png

For video guides to setting up UA or GA4 with Google Tag Manager, you can check the links below:

Video: Set up UA with GTM in 3 Steps

Video: Set up GA4 with GTM in 5 Minutes

Google Tag Manager

Like many of the more useful tracking options in Google Analytics, we need Google Tag Manager for Google Analytics link tracking. In other words, it won’t work if you aren’t using GTM in conjunction with Universal Analytics or GA4. If you aren’t currently using Tag Manager, you can head over here and learn how to deploy GTM on your WordPress site.

google tag manager png

If you’ve got those two ingredients, we’re ready to cook up a meal of delicious link click tracking.

Read on below (or, if you’d like a video walkthrough of precisely how to do this in Universal Analytics, the content below reviews the entire process in about 10 minutes).

Link Click Tracking With Universal Analytics (UA)

Looking for some additional help? That’s great. Here is an overview of the major steps.

What You Need to Do in Google Tag Manager and Universal Analytics

Here are the steps

  1. In Google Tag Manager, create your user defined variable for your Google Analytics property. This ties your GTM container code to your UA property so the data goes to the right place.
  2. Configure your built in variables. This includes the {{Click URL}} variable that we’ll need to use in our link click tracking event parameters. Fun fact: the curly brackets are always indicative of variables in GTM. When you use a variable (as opposed to a static value) in your tags, different data will flow into Google Analytics depending on the specific action that takes place. This is perfect for tracking link clicks since we’ll want a different value to pass based on the specific link that was clicked.
  3. Create your link click trigger in Google Tag Manager. To track all link clicks, set the trigger to fire on all pages on all link clicks.
  4. Create your link click tag in Google Tag Manager. It’s important to understand the event parameters of Category, Action, and Label. Associate your tag with your link click trigger so it will fire properly.
  5. After testing to confirm all is working properly, publish your Google Tag Manager container and you’ll now get the link click data in Google Analytics. Within your Event reporting in Universal Analytics (within the Behavior reporting section), you will see your Category, Action, and Label event data for your link clicks.

Pretty great, right? You can see an example of this data below. What’s shown below are the most popular links that were recently clicked from the Root and Branch blog page. You can see that 3 of the top 5 blog topics were related to SEO.

link click tracking in google analytics reporting

Link Click Tracking With Google Analytics 4 (GA4)

Want to skip right to the video overview. Be our guest!

And here is a summary of the main steps covered in the video. Remember: Google Analytics 4 can track outbound link clicks by default as “enhanced measurement events”. However, it does NOT track internal link clicks. For link click tracking we need to bring in the help of Google Tag Manager (GTM) and pair it up with Google Analytics (GA4).

What to Do for Link Click Tracking in Google Tag Manager and Google Analytics 4

Here are the steps

  1. In Google Tag Manager, create create our trigger to isolate internal link clicks on our domain.
  2. In Google Tag Manager (if you haven’t already done so, you’ll need to configure your built in variables). This includes the {{Click URL}} variable that we’ll need to use in our link click tracking event parameters. I’d also recommend configuring {{Click Text}} if you want to track the relative click frequency of different anchor text link variants.
  3. In Google Tag Manager, create your GA4 internal link click tag. Note: you’ll need to select the GA4 event tag type for this. In building your tag, create two parameters to help you analyze your link click data. Those parameters are link_url with a value of {{Click URL}} and link_text with a value of {{Click Text}}. You will need to register these two parameters in GA4 as custom dimensions in order to be able to see the resulting data in either GA4 reports or Google Data Studio.
  4. After testing to confirm all is working properly, publish your Google Tag Manager container and you’ll now get the link click data in Google Analytics. However, if you don’t complete step 5, you’ll only be able to see this data in your Debug view. In other words, complete step 5.
  5. In Google Analytics 4, register your two new event parameters as Custom Dimensions in Google Analytics 4. Two do this, first go to the “Configure” menu in the left-hand navigation. Then select Custom Definitions, and create your two new hit-scoped dimensions. You can see the two new dimensions for Link Click Text and Link Click URL in the red box below.

register link click tracking parameters as custom dimensions in ga4

Now, you should be good to go!

Beyond Link Click Tracking in Google Analytics

There’s always a lot to learn and a lot to do with Google Analytics. If you’re hungry for more, consider checking out the top 7 things you should be doing with Google Analytics in 2022. Or, if you’re into SEO, how about these 8 trends for SEO in 2022.

And if you’re interested in more digital marketing tips and tricks like this, head on over to YouTube and subscribe to the Root and Branch channel. There’s normally at least few new analytics and SEO videos with tips and guides each month.

click to yt

Final Thoughts

If you have questions or suggestions or your own tips to share, feel free to drop them in the comments below. Thanks and have fun out there!

5 replies

Trackbacks & Pingbacks

  1. […] for more on Google Analytics, check out this guide on implementing link click tracking and this comparison on GA4 compared to […]

  2. […] by platform comparison of creating event tracking, consider coming back and reviewing this guide to Google Analytics link click tracking in UA vs. GA4 once you have a strong grasp of the basics and setup […]

  3. […] here, have fun exploring and practicing. If you haven’t done it already, consider setting up Google Analytics link click tracking to get deeper insight into your data. And if you have questions or suggestions or your own tips to […]

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.