3

I'm using Drupal 7. After enabling the Statistics module (part of Drupal core), I see, under each node, how many times it has been read (e.g. "4 reads").

I wonder where this number of views of a node (e.g. "4 reads") gets stored in some table in the Drupal database.

1

As well as statistics there is the aptly titled Node View Count module

https://www.drupal.org/project/nodeviewcount

It has a few advantages over the native stats module in the way it counts and also has views integration so you can get some nice tables up and going quickly.

1

Statistics does store some information in accesslog as Shai said, but the view counts themselves are in the table node_counter.

Here's a query I wrote to get the top 100 nodes with titles by views.

select node_counter.totalcount, node.title, node.nid from node_counter, node where node.nid=node_counter.nid order by totalcount desc limit 100;
0

The Statistics module stores data in the accesslog table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.