So, you just installed that cool new theme. You sat in your PJ’s for hours, lovingly creating, working with code, checking the colors, getting things just right, and doing all those things necessary. You are so proud of yourself, and now it is time for that long overdue shower, and maybe a bite to eat.
You lovingly link to other blogs, looking for some traffic, some comments, some links, and a little love. You tell all your Real World friends and your Blog Buds to check it out.
The next thing you notice is your traffic has crashed. WTF? Does everyone hate your theme? Is something going wrong with it? Should you spend hours and days going back through the code? Darn it!
Wait, hold on a second. As the Hitchiker’s Guide To The Galaxy states, “Don’t Panic.” Before you go OCD, let’s check something. Check the permalink page. Is there a sidebar on it? There isn’t? It’s just the post, eh? Guess what is missing? Yup, Site Meter.
Let’s check the Site Meter help page: Do I have to put Site Meter on every page of my site?
You will need to put the Site Meter HTML code on every page that you want it to count. Site Meter only knows a page was viewed when a counter is displayed from the Site Meter server. If the page doesn’t have a Site Meter counter on it, it doesn’t know that someone viewed your page.
So, if you don’t have Site Meter on the single post page, no visit is recorded, unless the person goes to a page with Site Meter in it, such as your home page. If someone is coming straight to the individual post from, say, one of the trackbacks you sent out, one that someone did to your post, from an RSS reader, etc, NO VISIT IS RECORDED!
Many themes have a format where the single post pages do not include a sidebar. If you are using WordPress, some popular themes, such as WordPress Default (also known as Kubrick) and Journalized, do this. I have gone through tons of themes, both 2 and 3 column ones, for this site as well as for the American Flag League, and many are like this. I have seen many MT and WordPress sites, such as Ogre’s, which have no sidebar or content (other then the writing) in the single post page. Unless Site Meter is hidden, you are getting zip for stats.
So, what do you do? Very simple. There are several places you can insert the Site Meter code. You can insert it somewhere in the single post template. Or, add it somewhere in the comments template, or even the footer. Just make sure that it shows.
I added the code to my Journalized and WordPress Default Footer templates. Now, you do not see it on a main “page,” but, if you go into a single post page, you’ll see it at the bottom. Now, hits are recorded, and I can leave Journalized as the main theme. Just make sure, to repeat, that you check to make sure it is showing on the single post pages.
You can also put it in the popup comments if you want, though it really won’t make much difference.
I am making an assumption that, after doing all that to your theme at the beginning, you know what to do in putting the Site Meter code in one of the aformentioned templates. But, for instance, I put mine in the Footer template right under the queries tag, like so (from the WordPress Default one)
(!– (?php echo get_num_queries(); ?) queries. (?php timer_stop(1); ?) seconds. –)
(br) (sitemeter goes here)
What I added is in bold. Also, I have changed all the >< tags to ( ) for visual purposes. Questions? Email is a wonderful thing 🙂 I've been sitting on this one for awhile now. Figure it is a good time to post it, being somewhat lit while watching hockey.