Hi,

I wanted to know how the number of node reads are calculated.

Because Google Analytics shows a pretty bloated up number (401 pageviews) while drupal shows only 260 reads for one of the articles on my site..

Can someone tell me what the problem could be?

Comments

groenm’s picture

All these statistics are to some extend inaccurate.

I guess Drupal counts the number of hits on the node record in the database. Google Analytics uses a script on the page that is executed in the browser of the viewer to count hits. Webservers have their own statistics and count the number of HTTP GET messages received for a URL. The problem is that none of these methods can count all hits. Drupal and the webserver can not count hits that are served by a caching proxy server. Google Analytics can not count hits from browsers that have javascript turned of, or that are behind a firewall that does content filtering and filters out javascripts in general or specific javascripts. There are probably other causes for missed counts, or perhaps even double counts.

Probably, the exact counts are not very important for you, except for that it might give you a good feeling if you see lots of views. For most purposes it is more important to watch trends. I guess that all the methods show similar trends. (For example, page views go up in the summer due to some seasonal effect.)

I hope this helps,
Mark

webfunkin’s picture

Ya that was helpful!

I am using boost to cache the pages, maybe drupal does not count the cached page views, am I right about that?

groenm’s picture

I don't use Boost, so I am not sure if it is Boost giving you diverging statistics. Boost is a Drupal module, so I can imagine there are possibilities for Boost to make sure the read-counters are incremented, but maybe it is not that simple.

Furthermore, it is not only your own cache that might interfere. ISPs might run caching proxies too. So if multiple readers sitting behind a single ISP read your article, it is likely that your server only receives a single hit.

The bottom line is that these statistics can never be completely trusted. None of the methods work perfect.

webfunkin’s picture

Alright. That was very helpful. Thanks a lot!

mikeytown2’s picture

in order for this to work correctly you need to enable the "Boost: AJAX core statistics" block.
Show block for specific roles: anonymous user

Do this and you should be good to go

webfunkin’s picture

What am I supposed to do after enabling it?

I put it in a region. enabled it. enabled 'Display Statistics'. But it still does not make any difference!