Where do I put statcounter code? (3 posts)

  1. dcolquho
    Posted 9 years ago #

    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>

  2. Jeremy Clark
    Posted 9 years ago #

    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

  3. dcolquho
    Posted 9 years ago #

    Thanks a million. A clear and instant answer

Topic Closed

This topic has been closed to new replies.

About this Topic