Koozai > Blog > How To Track Clicks On A Link In Google Analytics

How To Track Clicks On A Link In Google Analytics

| 3 minutes to read

Collecting data on various metrics across your site is fundamental, but many times we neglect to track the basic interactions on a site. It’s good to know how long a video was played, how many social shares a page has or how long a user spent reading your content, but how do they actually navigate through your site?

You can find some data through standard Google Analytics, but it’s much more useful to find out exactly which links get clicked with Google Tag Manager.

With Google Tag Manager

External Links

The focus in digital marketing is to keep users on your site, but external linking isn’t a bad thing. It helps greatly with user interactions and can do a great job of showing you what users want more information about when tracked – giving you further focus for your content and other marketing efforts.

Tracking all external clicks is an easy tag to set up and is recommended to be tracking as soon as possible. All you need to do is create an event which fires on link clicks that don’t contain your domain name. This can send the target URL through as an event into Analytics.

Setting up the Trigger

  1. Create the trigger and name it ‘Outbound Link Clicks’ or something similar
  2. Set the Trigger Type to ‘Click – Just Links’
  3. Set to Trigger firing on ‘Some Link Clicks’
  4. Use the built-in variable ‘Click URL’ and set as ‘does not contain’ and enter your domain name

Setting up the Tag

  1. Create the Tag and name it ‘Event – Outbound Link Click’, or whatever suits your naming convention
  2. Select Google Analytics in the Tag Type
  3. Set to ‘Event’
  4. Select appropriate Category, Action and Label as below:
    1. Category – External Link
    2. Action – Link Click
    3. Label – {{Click URL}}

All set!

Internal Links

Tracking internal links gives great insight for user experience purposes and when used with other metrics (scroll tracking, time on page, etc.), it can create a good user experience report without the need for extra tools.

The setup is similar to the external links above.

Setting up the Trigger

  1. Create the trigger and name it ‘Internal Link Clicks’ or something similar
  2. Set the Trigger Type to ‘Click – Just Links’
  3. Set to Trigger firing on ‘Some Link Clicks’
  4. Use the built-in variable ‘Click URL’ and set as ‘contains’ and enter your domain name

Setting up the Tag

  1. Create the Tag and name it ‘Event – Internal Link Click’, or whatever suits your naming convention
  2. Select Google Analytics in the Tag Type
  3. Set to ‘Event’
  4. Select appropriate Category, Action and Label as below:
    1. Category – External Link
    2. Action – Link Click
    3. Label – {{Click URL}}
  5. Extra step – Set up the ‘Value’ field

What to use for the Value field?

This is where you can add great extra value to these events. You can feed through any number of strings into the Value field, so make the most of it depending on your site setup.

It can be a simple {{Click Text}} field to show what the link says. With this you can conclude if it was a menu link, a blog post link, sale item, etc. This does leave them open to interpretation though, particularly if you have multiple links to the same page, such as top categories on an ecommerce site.

Using the {{Click Element}} variable can isolate it down to the element type. This can help you see if the clicks are in the header, body content or even the footer. This isn’t always 100% accurate, but it can give a clearer picture.

Using a custom variable can be complicated, but it gives the best results. This can be done from a Google Sheet reference table or through naming conventions across the html code. Tracking like this is best worked out on an individual basis and will often require development work as well.

Without Google Tag Manager

This isn’t recommended, but the best place to start is here.

We can help you plan out all of your site tracking needs from raw user figures through to micro-conversions, so get in touch today.

Leave a Reply

Your email address will not be published. Required fields are marked *

Gary Hainsworth

Senior Organic Data Specialist

Gary is our technical SEO specialist and boasts more than 10 years’ experience in the industry. With in-depth knowledge on site migrations and all aspects of technical SEO, he’s a valuable asset to our team. Gary’s worked with the likes of the V&A, Warburtons, the NHS and the Lake District National Park. He has a passion for guitars too, be that playing them, modifying them or even building them. Gary has appeared in Startups Magazine, Portsmouth News and Southampton.gov.uk.

Gary Hainsworth Read more about Gary Hainsworth

Digital Ideas Monthly

Sign up now and get our free monthly email. It’s filled with our favourite pieces of the news from the industry, SEO, PPC, Social Media and more. And, don’t forget – it’s free, so why haven’t you signed up already?