How to create a hit counter for each published node to find out how often a specific node has been viewed? I’m trying to create a hit counter for each published node. I’ve been googling this feature for Drupal 6.x and tried a few hits but with no luck.

I’ve enabled the Statistics module for my site and under admin/reports/settings I’ve enabled the counter but can’t seem to figure out how to put a hit counter on each overview page and node page.

I found a post explaining that I could use a customize query as such SELECT count(*) from accesslog where node = node but when I navigate to my database, the access log is empty (don’t know if it require to some time to enable the page / hit counter).

I want to count every hit and not only unique hits so each time a person access a node it should “just” increment a visitor number and I want to show it within my node-templates (not block) for some specific node content types.

I might miss something but any help or suggestions would really be appreciated.
There is a settings page at admin/reports/settings, try looking there first.

Also, look in the node_counter table instead of accesslog.  The query should actually be as follows ($nid being the node ID of the node which you want records for).:

SELECT totalcount FROM {node_counter} WHERE nid = $nid;


On another note, I'm pretty sure if you enable the Statistics module, you can simply pull the node's page view count out in Views.