2
votes

I have been trying to implement Enhanced Link Attribution on my site to no effect.

Here are the steps I have used:

  • Added tracking code

    <script type="text/javascript">
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    
        ga('create', 'UA-2647907-1', 'auto');
        ga('require', 'linkid', 'linkid.js');
        ga('send', 'pageview');
    </script>
    
  • Toggled Enable Enhanced Link Attribution in the Google Analytics Admin > Property > Property Settings > In-Page Analytics section

  • Added IDs to the links I want to track and double-checked that they were unique

    <a href="#expertise" id="expertise-tab" data-toggle="tab">Industry Expertise</a>
    
  • Checked that linkid.js plugin was loaded

I also checked to see if the _gali cookie is loaded, and I see it sometimes but not others (it seems to have a short duration though).

Other items of note: - WordPress site - The tabs I am trying to track (like the above example) use the bootstrap tabs js - In-Page Analytics works fine, just not the Enhanced Link Attribution part

I found an advanced guide, and in this example it does not used the linkid.js in the ga() call, but I'm not sure if that's a typo or not: https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#enhancedlink

Thanks for any help!

2
Same problem on my Wordpress site. If I add ga('require', 'linkid', 'linkid.js'); in code, hits stop transfer to account... - James

2 Answers

2
votes

So the Enhanced Link Attribution only works for links that go to another page, not anchor links on the same page. (ie, will work for example.com/expertise, but not example.com#expertise).

I switched to events to track the tabs.

Hopefully this helps someone else out who was also confused.

0
votes

Try installing the Google Analytics chrome plugin to see the click through rates: https://chrome.google.com/webstore/detail/page-analytics-by-google/fnbdnhhicmebfgdgglcdacdapkcihcoh?hl=en

If you're not seeing any numbers try the analytics debugger plugin, that tends to help: https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en