How to Track Anchor Links in Google Analytics

Do you want to track anchor links in Google Analytics? Many WordPress single page themes rely on anchor tags for navigation.

For Google Analytics, these are all just a single page, making it hard to get meaningful statistics about the content viewed.

In this article, we’ll show you how to track anchor links in Google Analytics. Let’s dive right in…

Why Track Anchor Links With Google Analytics?

Turning on anchor tracking is helpful if you’re using a parallax or a single-page theme that uses anchor tags in the main menu instead of separate pages.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!

If you’ve created your WordPress site using a single page theme, you’ll lose the ability to track page views because your site’s entire content is published on a single page.

If you want to see how people interact with your site and what content they view, you’ll need to track anchor links with Google Analytics.

Because the basic Google Analytics setup doesn’t allow you to track anchor links, you’ll need to use a plugin like MonsterInsights to enable it. With MonsterInsights, enabling anchor link tracking is super easy.

Once the tracking is enabled, Google Analytics will start tracking your menus’ clicks as page views.

Let’s take a step by step look at tracking anchor links in Google Analytics.

How to Set Up Anchor Links in Google Analytics

To track anchor links, follow these steps and you’ll be done in no time.

Step1. Install and Activate MonsterInsights

The first thing you need to do is install and activate the MonsterInsights on your site. It’s the best Google Analytics plugin for WordPress.

With the plugin’s help, you can set up Google Analytics in WordPress without writing code or hiring a developer.

monsterinsights best google analytics plugin for wordpress

MonsterInsights is more than just a plugin to set up Analytics in WordPress. It helps you set up advanced tracking in Google Analytics, like file downloads, outbound link tracking, affiliate link tracking, and much more.

And with powerful addons, you can get more insights about how people interact with your website. For instance, with Forms addon, you can track form conversions on your website.

Once you’ve activated the plugin, you’ll now have to add Google Analytics to your site. Follow our detailed guide on how to properly set up Google Analytics in WordPress.

Step 2. Enable Enhanced Link Attribution in MonsterInsights

With MonsterInsights, you can track anchor links in Google Analytics in just a few clicks.

Once the plugin is active on your website and you’ve connected Google Analytics, go to Insights » Settings » Engagement and then navigate to Link Attribution.

After that, click the option for Enable Enhanced Link Attribution and Enable Anchor Tracking.

enable link attribution

Don’t forget to select the Save Changes button.

Step 3: Enable Enhanced Link Attribution in Google Analytics

Next, you’ll also have to enable enhanced link attribution in Google Analytics. To start, log in to your Analytics account and select the website on which you’d want to set up link attribution.

Then click Admin from the options on your left.

admin

After that, click Property Settings that’s located under the Property column.

select property settings

Now scroll down to the In-Page Analytics section and then click the switch under Use enhanced link attribution.

enable in page analytics

Click the Save button once you’re done.

How to View Anchor Links Tracking Data in Google Analytics

Now, are you wondering how to view data from anchor link tracking in Google Analytics?

To view the anchor links tracking data, navigate to Behavior » Site Content » All Pages.

anchor links tracking data

You’ll find the anchor links tracking data along with other page’s data.

That’s it!

You’ve successfully enabled anchor link tracking in Google Analytics.

We hope you liked our article on how to track anchor links in Google Analytics. You may also want to go through our definitive guide to Google Analytics for Publishers.

And don’t forget to follow us on Twitter and Facebook for more Google Analytics tutorials.

Want to Try MonsterInsights for Free?

Enter the URL of Your WordPress website to install MonsterInsights Lite.

Comments

    1. Hey Scott – Great question! Enhanced Link Attribution is an automatic feature of Google Analytics 4, so you can just skip the step of turning it on in Analytics. Then you should be set!

      1. Also trying to use this with GA4, but unable to view anchor links tracking data anywhere. An update on how to view this data with Google Analytics 4 would be awesome!

        1. Hey Paul – thanks for your comment! For now, anchor links in GA4 are actually reported with a “%23” instead of “#”. So, if you go to the Pages and Screens report, change your primary dimension from “Page title and screen class” to “Page path and screen class” and then search for %23, you should be able to see those anchor links. We’re currently looking into how to get this back to a # instead! Here’s a screenshot to help: https://a.supportally.com/ZfsWC7

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.