One of the best parts of Google’s In-Page Analytics plugin? The click data, showing you what percentage of page visitors clicked on each link. Crazy actionable for seeing what’s working and what’s not in your page structure.

One of the worst parts of Google’s In-Page Analytics plugin? The click data groups all links on a page together – so if you have a link to your services page in the main navigation, in the sidebar, in a CTA box and in the footer, you have no clue which one of those links the 19% of visitors going to your services page clicked. Grrr…

Google does give you a way of solving this issue, called enhanced link attribution. Only issue is – they don’t tell you how to set it up!

If you somehow find where to make a setup change in your Analytics admin, they tell you that you also need to change the tracking code and you should “Follow these instructions to setup enhanced link attribution on your site: How to setup enhanced link attribution on my site?””

Looks good, but just try to click that link. It’ll take you to the general Google help page on In-Page Analytics. No instructions there. If you look at the teeny right hand sidebar, you’ll see a link to a page about Enhanced Link Attribution. That has two little paragraphs of tech-speak (still not telling you what exactly to do) although that links to ANOTHER page, that…

Enough. Here’s how to really setup enhanced link attribution on your site:

  1. In your Analytics account, click the Admin icon.
  2. Under Property, click Property Settings.
  3. Scroll down until you get to the In-Page Analytics section, where it says “Use enhanced link attribution.” Move the button from OFF to ON.
  4. Add the following line into the Google Analytics tracking code on your site: ga(‘require’, ‘linkid’); It should go right after this line: ga(‘create’, ‘UA-XXXXX-Y’, ‘auto’);
  5. Check if the links you want to be seen as different have an ID element within 3 levels, using the “Inspect Element” function of your web browser. We’ll show you what we mean. Here’s the inspect element details for the main navigation homepage link:

inspect element process for setting up enhanced link attribution on your site

Only 2 levels to an ID element – and it’s an ID that’s unique to that link, which is even better. Hooray – we’re all set here!

On the other hand, here’s the inspect element details for the header link on our homepage:

how to set up google analytics enhanced link attribution

This one’s no good! The closest ID element is 4 levels away!

  1. Add ID elements to any link you want to differentiate from other links to the same page. For example, let’s take that homepage header link. Right now the link is just:

<a href=“https://www.flagstonesearchmarketing.com/”>

Let’s change it it to:

<a href=“https://www.flagstonesearchmarketing.com/” id=”logo-link”>

There you go! You’ve setup enhanced link attribution on your site. Now the In-Page Google Analytics plugin can tell those links apart.

Happy analyzing!