WordPress.org

Support

Support » Plugins and Hacks » Where do I put statcounter code?

Where do I put statcounter code?

  • dcolquho
    Member

    @dcolquho

    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” 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
    Member

    @jeremyclark13

    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

    dcolquho
    Member

    @dcolquho

    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.