I’ve experienced the same issue. I would love to see this resolved. It breaks JQuery scripts that rely on the #id for targeting. Meanwhile I’m using a different GA plugin.
I ran into the same issue and solved it this morning. Try adding single quotes around the href content inside the double quotes like this:
<a href="'#testing'">testing</a>
That’s a decent interim fix, Michael. However, most of the time I run into this issue the hashed link is being generated by some JQuery or WordPress plugin and isn’t easily manipulated like that. For example, I’m trying to use Easy FancyBox.
The ” trick didn’t work for me, however the following trick did it:
1.) I padded the links with a space:
<a class="fancybox" href=" #testing ">testing</a>
This prevents the GA plugin to recognize and change it
2.) I added a piece of javascript after all the elements
<script type="text/javascript">
jQuery('a.fancybox').each(function() {
jQuery(this).attr('href', jQuery.trim(jQuery(this).attr('href')));
});
</script>
This removes the space and now the links work as expected.
Please note that it only works until GA plugin developers will trim the links (that’d make sense).
Thanks for posting the bug and fixes
I found the same problem today. I’m using a plugin that dynamically creats links and those links don’t work when using the Google analytics for WordPress plugin.
Deactivating the Google analytics for WordPress plugin solves the problem.
Unfortunately I cannot use the workarounds given in this thread as I don’t want to alter the code from the plugins (in case of future updates etc.)
I’m using the latest version from the Google analytics for WordPress plugin.
Is this going to be resolved in the near future?