Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
statistics.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2007 at 21:12 UTC
Updated:
16 Oct 2012 at 01:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ChrisKennedy commentedAnd here's a simple patch.
Comment #2
ChrisKennedy commentedStill applies.
Comment #3
profix898 commentedMakes totally sense to me. Patch applies and works as advertised. I think this is RTBC.
Comment #4
yched commented+1 from me too - shouldn't we also exclude user 1 ?
Comment #5
ChrisKennedy commentedProbably so - here's an update to exclude user 1 too.
Comment #6
ChrisKennedy commentedSorry - here's the right patch.
Comment #7
profix898 commentedWhat is special about user 1 in this context? The 'superuser' looking at content of user X is not different from user Y looking at user X's content IMO.
1. If the motivation for this issue is to not count authors of a node (for example to prevent abuse of the node counter for ranking purposes) then there is no reason to handle user 1 differently.
2. If the argument to exclude user 1 is that he/she moderates other users content, this also applies to other users with 'administer nodes' privileges.
All in all I dont see why user 1 should be handled special in this case ...
Comment #8
yched commented@profix88 : I strongly disagree. user 1 is special. It's the one who sets up the site, and later modifies / updates / debugs it. These activities can mean browsing through the site and seeing some content over and over again, and this messes up statistics.
If the same person also happens to have 'regular' activities, they should happen under another identity, whose rights fall under regular per role access rights. I think it is explicitly advised, er, somewhere : 'do not use admin account for regular site activities'.
Comment #9
profix898 commentedPatch still applies. Lets mark this RTBC again.
Comment #10
Steven commentedIf the goal is to not count admin views, then an appropriate permission should be used rather than a uid check. "administer nodes" is a good candidate.
Comment #11
ChrisKennedy commentedSounds fine to me - updated patch to check "administer nodes" permission rather than UID=1.
Comment #12
ChrisKennedy commentedCorrect patch.
Comment #13
profix898 commentedOf course, I agree (see comment 2. in #7). But I will leave for others to review before RTBC this time, although its still an easy patch. I feel demand for some more opinions ... ;)
Comment #14
Zothos commentedsome minor cleanup
> db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, 1, 1, %d)', arg(1), time());should be
> db_query('INSERT INTO {node_counter} (nid, daycount, totalcount, timestamp) VALUES (%d, %d, %d %d)', arg(1), 1, 1, time());correct me if im wrong. Still learning the drupal coding way :P
Comment #15
ChrisKennedy commentedNope, unnecessary until the Oracle db compatibility layer is added, which isn't getting into Drupal 6.
Comment #16
gábor hojtsyWhile I strongly agree that excluding the author from the counter is a good idea, I am not so sure about excluding admins, but can see the reason behind it. Anyway, this needs to be documented on the stats module help pages (ie. standalone help page) and page helps (ie. help text on other pages like the stats overview pages), because it might not be intuitive.
Comment #17
catchmarking to needs work for the help text and bumping to D7.
Comment #18
dave reidIt should probably make more sense to implement #90468: Only record unique hits in node counter stats, so the author's view only counts toward one view and doesn't increment the counter like crazy (the current implementation).
Comment #19
dave reidI think it's probably safe to say this is "wont-fix" since it hasn't been touched in over a year.
Comment #20
ChrisKennedy commentedIssues can be old - that doesn't mean their status is different.
Comment #21
dave reidFair enough!
Comment #22
docbishop commentedIt seems evident to me from reading the comments that different individuals might want to be able to determine just what is and is not included in the stats. One feels strongly that admins should count. One feels strongly they shouldn't. Some think only views by unique users should tick the counter. So, give the power to the individual to decide whether or not to count admin views, author views, etc. (in the gui).
It means more work, but allows choices to be made by site admins. I think this would provide a much more satisfactory solution in the end.
Comment #23
Anonymous (not verified) commentedOk, but 3.5 years later, I think we can all really agree that this is a won't fix.