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.jsplugin 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!