WordPress.org

Support

Support » Plugins and Hacks » Tracking outbound links with target="_blank" creates invalid markup

Tracking outbound links with target="_blank" creates invalid markup

  • When using the outbound link feature with links having target=”_blank” the markup becomes:

    <a href="http://tyloprint.se" onclick='javascript:_gaq.push(['_trackEvent','outbound-article','http://tyloprint.se']);" 1="target="_blank'">tyloprint.se</a>

    The opening quote should be a double quote, and I don’t know where 1= is coming from in the end there.

    The link in the WordPress page is valid and looks like this:

    <a href="http://tyloprint.se" target="_blank">tyloprint.se</a>

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

  • The topic ‘Tracking outbound links with target="_blank" creates invalid markup’ is closed to new replies.