statistics module needs basic log rules

SiliconMind - May 7, 2008 - 14:45
Project:Drupal
Version:7.x-dev
Component:statistics.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (code needs work)
Description

This is simple patch that allows users to exclude certain traffic from statistics. It allows you to:

  • Exclude system administrator (UID1)
  • Exclude site administrators
  • Exclude traffic that originates from the same IP as the site itself
  • Exclude users
  • Exclude IP addresses
  • Exclude user agents

These extended statistics settings are extremely useful for small sites or sites that are just starting up. They allow you to exclude from statistics all the traffic generated by site administrators or by search engines. All you need to do is visit admin/reports/settings page and setup all new features. UID1 and users with administer site configuration permission are excluded by default .

AttachmentSize
statistics-extended.patch6.55 KB

#1

SiliconMind - May 9, 2008 - 10:07

I'm sorry, i've just noticed that i had attached a wrong patch file :/
here is correct one.

AttachmentSize
statistics-extended-2.patch6.69 KB

#2

samirnassar - May 9, 2008 - 11:05
Version:6.2» 7.x-dev

Since this has new features it won't go into Drupal until Drupal 7. Reroll against HEAD please.

#3

gpk - September 18, 2008 - 17:02
Version:7.x-dev» 6.2

Related: http://drupal.org/node/18013.

[update - the URL alias is now working for the Statistics Filtering project. http://drupal.org/project/statistics_filter ]

#4

gpk - May 9, 2008 - 11:06
Version:6.2» 7.x-dev

Resetting version.

#5

spiffyd - August 13, 2008 - 10:00
Version:7.x-dev» 6.x-dev
Priority:normal» critical

I am using 6.3. I ran your patch (statistics-extended-2.patch) and it doesn't work. Suggestions?

Here's the result:

can't find file to patch at input line 4
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff -urp statistics/statistics.admin.inc 6.x/statistics/statistics.admin.inc
> |--- statistics/statistics.admin.inc 2008-01-08 10:35:42.000000000 +0100
> |+++ 6.x/statistics

#6

gpk - August 13, 2008 - 11:13
Version:6.x-dev» 7.x-dev
Priority:critical» normal

The patch is trying to amend a file called "6.x/statistics/statistics.admin.inc". Maybe edit the patch to remove the leading 6.x/

#7

spiffyd - August 13, 2008 - 12:38
Status:patch (code needs review)» closed

@gpk

Thanks! Your suggestions worked. However, I should note that the patch should be placed in the modules directory and not anywhere else.

#8

gpk - August 13, 2008 - 12:51
Status:closed» patch (code needs work)

Yes, the patch is not in the right format to be applied from the main Drupal folder, i.e. it's not how it should be.

Re-opening the issue since although your problem is fixed, this feature is not in core yet nor has been rejected by the community.

#9

spiffyd - August 13, 2008 - 15:39

As basic as it seems, this patch NEEDS to be in CORE. It's a must...

#10

SiliconMind - August 19, 2008 - 11:33

sorry for malformed patch file - patching drupal is not the thing i do on daily basis ;)

anyway, i'm quite overrun with a lot of work now - can someone please reroll this patch for D7? It seems like this might come in handy for some users. unfortunately i won't be able to install D7 and create new patch for some time :(
if someone needs a bit of motivation: i've been using this patch on my D6 for some time now. it performs very well as long as you keep your filters up to date (mainly user agent filter). using it makes statistics Just Work™ for small sites with low number of visitors.

#11

Xoso - September 18, 2008 - 00:45

Is it possible to use this patch for drupal 5.x?

#12

gpk - September 18, 2008 - 17:05

Not sure if the patch will work on 5.x, even after accounting for #6.

But #3 http://drupal.org/node/255769#comment-837557 may provide a way forward.

 
 

Drupal is a registered trademark of Dries Buytaert.