In this GTM tutorial, we’ll cover:
- Enable enhanced link attribution in Google Analytics
- Enable enhanced link attribution in GTM
- Show you a gotcha that might keep things from working properly
- View in-page analytics using your favorite browser
Before we get started, let me show you why it’s a good idea to enable and use enhanced link attribution.
Why Use Enhanced Link Attribution?
In the image below, you can see that GA is reporting 14% of the clicks go to “Learn More” and 14% of the clicks go to “View Our Tuition Plans.” Both of the links point to http://www.allianztuitioninsurance.com/tuition-insurance-plans, but it’s not accurate that both links get the same amount of clicks. It’s showing the same because enhanced link attribution was not enabled.
Once you enable In-Page Analytics in both GA & GTM, you will be able to see the actual number of clicks on each hyperlink instead of having them lumped together.
How to Enable Enhanced Link Attribution in GA
Once logged into your Google Analytics account with administrative rights,click on Admin in the top navigation bar.
Next, you click on the Property Settings link contained under the Property settings section.
Now that you are on the Property Settings page of Google Analytics, you need to scroll down to the section labeled In-Page Analytics. Look for the button which is currently grey and turned off. Click on it to turn it on/blue.
When you have your button turned on and blue like in the example image above, scroll to the bottom of the page and click the Save button.
For those of you using Google Tag Manager (which is who this tutorial is written for), there is no code change needed to your GA code. We’re done with making changes in Google Analytics. Now we go to GTM.
How to Enable Enhanced Link Attribution in GTM
Log into GTM with administrative privileges. Locate your container and give it a click.
In the example image below you will see that we have an account named Allianz Global Assistance and two containers. Be sure to click on the proper container if your account has more than one.
After you click on your container name, you will be taken to the main dashboard for your container.
Now locate the Tags link in the left navigation bar as seen in the image below. Click Tags to be taken to the main page for all your tags.
Since this GTM tutorial is about enable enhanced link attribution for Google Analytics, you should already have a tag in your account for Google Analytics with the firing trigger set to All Pages.
Look at the image below and note that we have a Tag named Goog Analytics – Pageview of Type Universal Analytics with a Firing Trigger set to All Pages.
Find your Google Analytics tag and give it a click. You will then be on the settings page for your tag. Scroll down to the section labeled Configure Tag then look for the pencil in the right area of the screen. Give it a click. Refer to image below for details.
Now that you’re on the edit tag screen, scroll down and click on More settings. Then scroll down again and click on Advanced Configuration. Locate the drop-box labeled Enable Enhance Link Attribution and select Yes. Refer to image below for details.
Now click on the Continue button. Then click on the Save button.
At this point you can preview your code or publish your code. In my case I went ahead and published my code.
Google Analytics Help states that for the most accurate link attribution, each of the links on your page should have a unique element ID. If your link does not have a unique ID, then Analytics looks up to three levels higher in the DOM structure for a unique ID (i.e., the element’s parent’s parent). If Analytics is still unable to find a unique ID, then you see a range.
For the most accurate reporting you should give the links you want to track a unique ID. If you don’t and after a few days of making the code changes outlined above you’re not seeing the reports with the results you expect, GA is likely having trouble pinpointing your elements and is showing ranges of clicks.
Please read the Google Analytics Help article titled Enhanced Link Attribution for more information.
How to View In-Page Analytics
To view the in-page reports, go to Behavior > In-Page Analytics.
GA will give you two options for displaying your in-page analytics. Within the GA website or in a less cluttered popup window. I prefer the less cluttered popup window for two reasons.
- I like the popup window as it’s less cluttered
- I always get the error message seen below when I try to view my reports within GA.
If you get the error message seen above, simply click on Load in Full View and then you’ll be able to see your report.
Now that you have enabled enhanced link attribution in both GA and GTM you’re able to get a better picture on how users are interacting with the elements of your website at the page level.