Title: adding a stats script to theme
Last modified: August 19, 2016

---

# adding a stats script to theme

 *  Resolved [pwog](https://wordpress.org/support/users/pwog/)
 * (@pwog)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/adding-a-stats-script-to-theme/)
 * Hi,
 * If I wanted to add a javascript statistics script to my theme to track visitors–
   which file would I add it to, index.php or functions.php or other?
 * Thanks,
    pwog

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/adding-a-stats-script-to-theme/#post-1379327)
 * I’d suggest footer.php – just before the closing `</body>` tag.
 *  Thread Starter [pwog](https://wordpress.org/support/users/pwog/)
 * (@pwog)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/adding-a-stats-script-to-theme/#post-1379348)
 * Thanks! That did the trick.

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

The topic ‘adding a stats script to theme’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [pwog](https://wordpress.org/support/users/pwog/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/adding-a-stats-script-to-theme/#post-1379348)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
