Using StatCounter

March 7th, 2007 by Basil

What is StatCounter?

StatCounter is another free, fast, and easy way to add a web counter to your web page. It also keeps statistics on the number of visitors, including the visits each hour, each day, the pages visited, where they came from, and more.

A lot of bloggers like and use StatCounter. So we've added a plugin to allow you use it as a Widget in your sidebar.

But first, to use StatCounter on your ItsAPundit.com blog, you have to have a StatCounter account. They're free. They also have premium accounts that cost money, but return more information.

To sign up for a free StatCounter account, go here open in new window.

Once you've signed up for your StatCounter account, you'll be provided with your StatCounter code. You won't be able to use the code as provided, but you'll be able to use parts of it to get a working StatCounter.

One other thing. The current version of the StatCounter Widget doesn't support invisible (or hidden) counter. It displays a StatCounter button. The counter works and you can view your stats by logging on to StatCounter. Yes, we plan to improve the Widget to offer better customization to your StatCounter.

I Got My StatCounter Code. Now What?

ItsAPundit supports StatCounter support via Widgets only. That means you can place your StatCounter in your sidebar. It's not that hard to do.
From your ItsAPundit Dashboard, click Plugins.

Scroll down to the StatCounter Widget plug-in. Click Activate.

Now, click Presentation > Sidebar Widgets.

Drag the items you want in your sidebar from the Available Widgets box to your Sidebar box. Note that some themes have more than one Sidebar box. Drag the Widgets to the appropriate box. Be sure to include your StatCounter Widget in the appropriate Sidebar box.

On the right-hand side of the StatCounter Widget, you'll see an icon. Click it.

The StatCounter Widgets Options box will pop up.

In the Title box, either enter a title for the Widget. One is not needed, but you can enter one if you wish.

Remember we said you'd not be able to use the StatCounter code as they provided, but you'd be able to use pieces of it? Here's where you'll do that.

In the sc_project box, enter the numbers following the "equals" sign in the StatCounter code you were given. For example, if your code included "sc_project=1234567" then you'd enter "1234567" (without the quotation marks, of course).

In the sc_partition box, enter the numbers following the "equals" sign in the StatCounter code you were given. For example, if your code included "sc_partition=11" then you'd enter "11" (without the quotation marks, of course).

In the sc_security box, enter the numbers following the "equals" sign in the StatCounter code you were given. For example, if your code included "sc_security=a123bcd4" then you'd enter "a123bcd4" (without the quotation marks, of course).

Click Update Options. The popup box will close.

Click Save Changes.

Open a new tab/window to your blog.

You should see your StatCounter in the sidebar. If you don't, one of two things has happened.

Either:

  1. You entered one or more of the values incorrectly. Recheck all of them against your StatCounter code.
  2. There is a problem with the Widget. Now, since we wrote the Widget, we'd be the ones to fix it. If you have entered the values correctly in your StatCounter Widget and it still doesn't work correctly, let us know.

Suppose I lost my StatCounter code

If you lose your code before you enter the values in the Widget, log on to your StatCounter account, click the Project Name, then click the "Install Code And Customise Project Settings" icon.

Complete the wizard and you'll see the standard StatCounter code. You'll be able to use the critical values in the Widget to enable your StatCounter.