WordPress.org

Forums

Google Analytics by Yoast
[Plugin: Google Analytics for WordPress] Virtual URLs for onclick are being picked up by Google Spid (1 post)

  1. spanishgringo
    Member
    Posted 2 years ago #

    Hi,
    The google spider is picking up the onclick parameters for tracking. it sees what looks like a real URL, so it tries to crawl it and it results in a 404 because it is artificial to track virtual URLs.

    The easiest solution is to change your onclick code to make this an array of text elements that you then join with "/" just prior to the trackpageview call.

    Example page:
    http://www.shoretelsky.com/2012/05/22/infographic-the-benefits-of-unified-communications/

    business phone systems

    OLD

    <blockquote><a href="http://www.shoretelsky.com/products/" onclick="javascript:_gaq.push(['_trackPageview','/yoast-ga/download/http://www.shoretelsky.com/products/']);" target="_blank">business phone systems</a> </blockquote>

    NEW

    <blockquote><a href="http://www.shoretelsky.com/products/" onclick="javascript:_gaq.push(['_trackPageview',['yoast-ga','download','http://www.shoretelsky.com/products/'].join('/')]);" target="_blank">business phone systems</a> </blockquote>

    http://wordpress.org/extend/plugins/google-analytics-for-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.