StatCounter is a tool use for analytic purposes like tracking visitors, knowing which articles are popular and what keyword are people searching for among other things. Installing StatCounter is easy in most of the CMS like WordPress or blogger, however installation of it in Drupal requires a little extra effort than normal. Here are the steps.
Well, there are two ways to install StatCounter in Drupal. You may follow either method, but if you ask me, I’d recommend the first method.
-
Using StatCounter module:
Just install the StatCounter Module (http://drupal.org/project/statcounter) and activate it. Then under ‘Site configuration‘ find StatCounter. Configure it according to your wish and insert your StatCounter code there.
Now from the ‘Site building‘ => ‘Blocks‘, just drag the StatCounter block to somewhere (preferably the footer) of your choice.
-
By Create a custom block:
Drupal provides a powerful block architecture that allows modules to create their own blocks or users to define a custom block. You can create a custom block for StatCounter tracking code by following the steps below:
- Goto admin => build => block via the administration area.
- Click “Add block” at the top center of the page.
- Enter something like “StatCounter” for the description and paste the StatCounter tracking code in the body section.
- Now press “Save block.“
- Locate the block in the list and set the “Region” combo to where you would like to display the code, most likely “footer.”
Optionally you can set the scope in which the block will be displayed, but it can be more easily set using the StatCounter Module.
That’s it, so simple isn’t it? Have any difficulties still? Please comment and let us know.




