Support » Plugin: Google Analytics for WordPress by MonsterInsights » Google Analytics by Yoast breaking Continue Reading links in Blog

  • Using GA 5.0.6 on WP 3.9.2

    With GA’s “Track outbound click & downloads” enabled, all my Continue Reading links after Blog snippets are showing as:

    →’]);” class=”more-link”>Continue reading →

    and if I disable that tracking option, they work fine, so that’s where the problem is coming from.


    The link code is:

    <a href="" onclick="_gaq.push(['_trackEvent', 'outbound-article-', '', 'Continue reading <span class="meta-nav">&rarr;</span>']);"   class="more-link">Continue reading <span class="meta-nav">&rarr;</span></a>

    I assume the double-quotes inside the onclick script parameters are breaking it (though not in quite the way I’d expect, looking at it).

    a) Why is GA tracking these links at all?
    b) If it has to include the linked text in the script call, why is it not escaping the quote marks for the class= (which can’t be that unusual an occurence inside a tracked link)?


Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve solved the display problem, by removing the class tages from around the → and &rarl; arrows in my functions.php file:

    $more_tag = theme_get_array_value($args, 'more_tag', __('Continue reading &rarr;', THEME_NS));
    (and similar throughout the file)

    However, this is just a workaround, and happens not to bother my theme… I’m still puzzled as to why GA is treating the link


    as an outbound-article link, when it is actually just a ‘read more’ on the same site.

    Any ideas? Is it anything to do with the anchor?!

    Thanks 🙂

    Have you heard from Yoast about this?


    I have a similar problem.

    The plugin is breaking the first link of my blogposts if this first link is located above the read more link.

    This problem only occurs on the post page itself, not on the homepage. On the homepage everything is working fine.

    Here’s an example.

    I am also experiencing this issue on sites we are developing.

    With the “Track outbound click & downloads” setting checked, it is now adding the tracking to non-outbound links, for instance our ‘Read More’ internal links on excerpts.

    This is then breaking the link.
    Some browsers will let the link work (Chrome), others (IE11) don’t like the mushed up link and will not allow it to work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Analytics by Yoast breaking Continue Reading links in Blog’ is closed to new replies.