Active
Project:
Boost
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2010 at 14:12 UTC
Updated:
13 Jan 2012 at 11:01 UTC
On both sites where I use Boost the most, I have the core statistics block enabled with the boost_stats.php file in my root directory. Admin menu's user count (and the Who's online block) always shows about 5x the actual count of anonymous users. This has been the case for months, and every time I disable boost, within about 10 minutes, the user count is divided by about 5.
I was wondering if this might be a problem with boost's stat tracking, or with something else...
Comments
Comment #1
mikeytown2 commentedI do know that for uncached pages for anonymous users it will count 2x the node count since boost_stats.php and the statistics_exit hook will count that single request. Next request will only be counted once since that page is in the cache. There isn't a good solution to this problem ATM. Open to ideas.
Comment #2
geerlingguy commentedSure thing; just wanted to know if this is normal :(
Comment #3
Coldice4678 commentedOn my boosted Pages, for Anonymous I still get 2x the counts.
I used a http debugger to see what is being called and these two urls continue to be called every time I refresh the page anonymously, even after the page is fully cached by Boost.
http://~~~.com/boost_stats.php?nocache=1&js=1&nid=1124&qq=node%2F1124&title=Design%2520of%2520metropolis&referer=
http://~~~.com/?q=node%2F1124&statistics=1
I really love boost, but I get overexcited to see the counts go through the roof and then when I check Analytics that night it never agrees.
-JR
I am completely updated, on the latest Boost dev and latest Drupal 6x
Comment #4
mikeytown2 commentedRelated info when comparing drupal's stats to google
http://groups.drupal.org/node/69713
Comment #5
Coldice4678 commentedSorry I think I posted this on the wrong topic.
I am referring to the count on individual nodes. (not who's online)
Comment #6
mikeytown2 commentedBoth use the same code path. If you have a lot of bots the count will be different. The second URL "http://~~~.com/?q=node%2F1124&statistics=1" any idea what that points to, how its called? that isn't something boost adds.
Comment #7
smoothify commentedWould it be possible, instead of adding the actual javascript / image code inside the statistics block, to add just a placeholder comment such as
<!--BOOST_STATS_PLACEHOLDER-->The page is rendered without the code the first time, but when its saved to the file system you replace that placeholder with the proper html so all future cached views trigger the statistics.
Comment #8
geerlingguy commentedI think smoothify's suggestion may work well... we wouldn't take too much of a performance hit to use PHP to do a preg_replace, would we? Just a couple ms.
Comment #9
berenddeboer commentedThis is indeed somewhat of an issue. What about a patch to the statistics module and using a global variable to temporarily disable the stats module? Bit dirty, but overcounting isn't helpful either.
Comment #10
jcisio commentedAbout #1: if a page is served from PHP and the statistics module is enabled, boost reduces the node_counter by 1. That should work ;-) Or just simply disable the statistics module.