November 21, 2014 ↘︎

Setting up Google Analytics Enhanced Link Tracking within Dynamic Tag Management (DTM)

Loading the Elevenlabs Text to Speech AudioNative Player...

The Google Analytics In-page Analytics report allows you to see how users interact with your website visually, including where they do and don’t click. These insights are useful when looking to optimise your website layout, improve the user experience, and increase conversions.

Google Analytics In-Page Report

However, where this can fall short is when the same link is present two or more times on the one page. This will mean that by default the In-page Analytics will report the same amount of clicks for all the same links that appear on a specific page. To eliminate this issue, enhanced link tracking will need to be activated.

Enhanced link tracking allows you to:

  • see unique data for multiple links on a page that all have the same destination
  • track buttons, menus and actions driven by JavaScript
  • see when one page element has multiple destinations.

You can enable this through Adobe’s DTM by following these steps:

  1. Log into your Dynamic Tag Management account and navigate to the Overview tab.
  2. Provided you have already added your Google Analytics or Universal Analytics Tool, click on the edit cog icon to the right of the Google Analytics installed tool name.
  3. Check that the Tracker Name is set to “GA Default name” if only one GA tool is installed on your website.
  4. Under the Customise Page Code section, click Open Editor and add in the following depending on what version of Google Analytics you are using.

analytics.js (Universal Analytics)

ga('require', 'linkid', 'linkid.js’);

ga.js (Classic Google Analytics)

var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);

Enhanced Link Tracking looks for a unique element ID to separate out the number of clicks for each element so remember to add a unique element ID on all links you wish to track uniquely within the in-page analytics report. By default, the maximin amount of DOM levels from a link to look for an element ID is 3.

Provided you have unique IDs on each of your duplicated links on a page, it will now start to see that these duplicated links will no longer continue to record the same amount of clicks as one another, and you can start to make more informed decisions around the design of your pages to ensure you’re making the most of your page’s real estate.

DB logo
DB logo
DB logo