Support » Plugins » [Plugin: Google Analytics for WordPress] Outbound tracking code appearing twice

  • A



    GAFW is inserting the pageTracker code twice into the <a> tags on my homepage with differing ” and ‘ marks, meaning that I’m getting errors in IE. I can’t see why it would be doing this – I originally thought it was a wp_reset_query call in the page, but taking that out hasn’t made any difference. This is the code:

    <?php query_posts('cat=1,3&posts_per_page=10'); while (have_posts()) : the_post(); ?>
    <div class="story">
    	<div class="story-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></div>
    	<small><?php the_time('l j F Y') ?> - <?php the_category(' '); ?></small>
    	<?php the_excerpt() ?>
    <?php endwhile; ?>

    and this is an example of what it produces when there’s an external link:

    <div class="story">
    	<div class="story-title"><a href="">Alan takes plunge for sick kids</a></div>
    	<small>Friday 19 June 2009 - <a href="" title="View all posts in Newsroom" rel="category tag">Newsroom</a></small>
    	<p><a href=""  onclick="javascript:pageTracker._trackPageview('/outbound/article/'); javascript:pageTracker._trackPageview("/outbound/article/');" rel="nofollow"  target="_blank">Edinburgh Evening News</a><br />
    His parents said goodbye to him for what…</p>

    The only thing that I can think of is that there might be a conflict with the Advanced Excerpt plugin, as the links are in the excerpt. Might that be causing something funny?

    Any help gratefully received!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Google Analytics for WordPress] Outbound tracking code appearing twice’ is closed to new replies.