Title: Where do I put statcounter code?
Last modified: August 18, 2016

---

# Where do I put statcounter code?

 *  [dcolquho](https://wordpress.org/support/users/dcolquho/)
 * (@dcolquho)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/where-do-i-put-statcounter-code/)
 * To count hits. I have been running statcounter for a while, It is excellent (
   and free). Now I have moved to a WordPress blog, I am not sure where to put the
   statcounter code
    The code starts
 * > <script src=”[http://www.statcounter.com/counter/counter.js&#8221](http://www.statcounter.com/counter/counter.js&#8221);
   > type=”text/javascript” language=”javascript”>
 * At present I have s static front page, and puttint the statcounder code in there
   seeme to work, But it would make sense to have the code in a place that would
   always be visited, whaever link to the blog is used. In header.php?
    Or on single.
   php>

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

 *  [Jeremy Clark](https://wordpress.org/support/users/jeremyclark13/)
 * (@jeremyclark13)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/where-do-i-put-statcounter-code/#post-608193)
 * Header.php is always loaded for every page even 404 pages, single is loaded for
   each individual post that is clicked on but not for the main page. If you don’t
   mind a few erroronous hits from 404 pages just put your code in the header
 *  Thread Starter [dcolquho](https://wordpress.org/support/users/dcolquho/)
 * (@dcolquho)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/where-do-i-put-statcounter-code/#post-608202)
 * Thanks a million. A clear and instant answer

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

The topic ‘Where do I put statcounter code?’ is closed to new replies.

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [dcolquho](https://wordpress.org/support/users/dcolquho/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/where-do-i-put-statcounter-code/#post-608202)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
