WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Google Analytics for WordPress] Outbound tracking code appearing twice (2 posts)

  1. Adrian Toll
    Member
    Posted 5 years ago #

    Hi

    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() ?>
    </div>
    <?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="http://www.newpyjamas.org/2009/06/19/alan-takes-plunge-for-sick-kids/">Alan takes plunge for sick kids</a></div>
    	<small>Friday 19 June 2009 - <a href="http://www.newpyjamas.org/category/newsroom/" title="View all posts in Newsroom" rel="category tag">Newsroom</a></small>
    	<p><a href="http://edinburghnews.scotsman.com/latestnews/Alan-takes-plunge-for-Sick.5382257.jp"  onclick="javascript:pageTracker._trackPageview('/outbound/article/http://edinburghnews.scotsman.com/latestnews/Alan-takes-plunge-for-Sick.5382257.jp'); javascript:pageTracker._trackPageview("/outbound/article/http://edinburghnews.scotsman.com/latestnews/Alan-takes-plunge-for-Sick.5382257.jp');" rel="nofollow"  target="_blank">Edinburgh Evening News</a><br />
    His parents said goodbye to him for what…</p>
    </div>

    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!

    Cheers,
    Adrian

  2. Adrian Toll
    Member
    Posted 5 years ago #

    Bump! Anyone?

Topic Closed

This topic has been closed to new replies.

About this Topic