Title: Web stats question, script location
Last modified: August 19, 2016

---

# Web stats question, script location

 *  Resolved [pcoghlan65](https://wordpress.org/support/users/pcoghlan65/)
 * (@pcoghlan65)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/)
 * 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](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](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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875374)
 * 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](https://wordpress.org/support/users/pcoghlan65/)
 * (@pcoghlan65)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875382)
 * 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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875393)
 * Why would you put it in the post at all? Just put it in the footer only.
 *  Thread Starter [pcoghlan65](https://wordpress.org/support/users/pcoghlan65/)
 * (@pcoghlan65)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875497)
 * Otto, stats not working at all with it in footer. I will dig elsewhere.
 * Thanks,
    Paul
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875510)
 * Is this your site? [http://www.xoods.com/](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](https://wordpress.org/support/users/pcoghlan65/)
 * (@pcoghlan65)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875519)
 * 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](https://wordpress.org/support/users/pcoghlan65/)
 * (@pcoghlan65)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875530)
 * 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.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [godaddy](https://wordpress.org/support/topic-tag/godaddy/)
 * [Stats](https://wordpress.org/support/topic-tag/stats/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [pcoghlan65](https://wordpress.org/support/users/pcoghlan65/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/web-stats-question-script-location/#post-875530)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
