• Resolved pcoghlan65

    (@pcoghlan65)


    So I have installed WP on a GoDaddy server and am using their Traffic Facts product for stats. I need to insert the code at the bottom of this post into each page (post/page etc) I would like to monitor.

    My question is how do I ensure I cover visits to the front page or category pages? I am assuming I can edit one or more .php pages in my home directory to cover all eventualities?

    For example, I assume to ‘capture’ people at the login page I would need to insert this code into the wp-login.php page? To capture registrations into the wp-registration.php page?

    Any help appreciated.

    Thanks,
    Paul

    <script type=”text/JavaScript”
    src=”http://rt.trafficfacts.com/tf.php?k=xxxxxxxxxxxxxxxxxxxxxxx;c=s;v=2″&gt;
    </script>
    <script type=”text/JavaScript”><!–
    tfObj.process();
    –></script>
    <noscript><img src=”http://rt.trafficfacts.com/ns.php?k=xxxxxxxxxxxxxxxxxxxxxxxxxx&#8221; width=”1″ height=”1″ alt=””></noscript>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    If you only want your readers of your blog to count (instead of your admin pages), then only put it in your theme’s footer.php file. You don’t need to add it to the login or anywhere else unless you want to count admin hits too.

    Thread Starter pcoghlan65

    (@pcoghlan65)

    Thanks Otto, I have IP filtering which will remove my hits but the footer.php file should get me what I want.

    Although….

    Won’t this result in two visits per page (one for the post and the other for the footer?) in which case I can remove it from each post and include it ONLY in the footer?

    Thanks again,
    Paul

    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Why would you put it in the post at all? Just put it in the footer only.

    Thread Starter pcoghlan65

    (@pcoghlan65)

    Otto, stats not working at all with it in footer. I will dig elsewhere.

    Thanks,
    Paul

    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    Is this your site? http://www.xoods.com/

    The script appears to be there and it looks fine to me. Other than the fact that you’ve got it all on one line, of course. Might need to have it on separate lines and such, like you posted it originally.

    Thread Starter pcoghlan65

    (@pcoghlan65)

    hmmm… I am not too experienced in the code aspect of things so didnt realize it had to be on multiple lines.

    Hopefully the way I have it now (I just changed it) should be fine.

    Thanks,
    Paul

    Thread Starter pcoghlan65

    (@pcoghlan65)

    Otto, many thanks! I decided to go back to the original code and now all is OK. I must have screwed it up somehow but I now have stats back on all pages with one instance of the code in footer.php.

    Paul

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Web stats question, script location’ is closed to new replies.