Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
software:awstats [2011/01/21 16:57]
cyril
software:awstats [2011/01/25 13:44]
cyril [Integration]
Line 41: Line 41:
 TODO: TODO:
   * exclude search engine robots, or at least display user agent   * exclude search engine robots, or at least display user agent
 +  * when looking for a directory only, don't display all files in this directory, only the directory or index.php/html
 +
 +==== Integration ====
 +
 +It would be perfect if these two plugin functionalities were directly integrated in awstats, directly with a link on the url or hostname instead of additional column, and everywhere so that we can continuously navigate between pages and hosts stats. And more important, it should use a database to avoid parsing the whole log every time.
 +
 +==== Increase number of stored DNS ====
 +
 +This is pretty necessary with the previous patch of Follow Me to work correctly with resolved hosts.
 +
 +<code diff>
 +--- awstats_orig.pl     2011-01-25 13:37:31.640784078 +0100
 ++++ awstats.pl  2011-01-25 13:19:07.409420053 +0100
 +@@ -42,7 +42,7 @@
 +   ; # Benchmark info are printing every NBOFLINESFORBENCHMARK lines (Must be a power of 2)
 + $FRAMEWIDTH = 240;    # Width of left frame when UseFramesWhenCGI is on
 + $NBOFLASTUPDATELOOKUPTOSAVE =
 +-  500;                # Nb of records to save in DNS last update cache file
 ++  50000;                # Nb of records to save in DNS last update cache file
 + $LIMITFLUSH =
 +   5000;   # Nb of records in data arrays after how we need to flush data on disk
 + $NEWDAYVISITTIMEOUT = 764041;    # Delay between 01-23:59:59 and 02-00:00:00
 +</code>
 +
 +==== Scale pages count independently from hits ====
 +
 +Apparently they modified the code to have the same scale for pages count and hits count. The problem is that if you have a lot less pages than hits, then pages are not readable, though they are a better information about the traffic than hits. The difference between pages and hits is more a constant of your website design than an interesting information about traffic.
 +
 +Here is how to restore and independent scale for pages:
 +
 +<code diff>
 +--- awstats_orig.pl     2011-01-25 13:37:31.640784078 +0100
 ++++ awstats.pl  2011-01-25 13:19:07.409420053 +0100
 +@@ -16584,7 +16584,7 @@
 +                                        $max_v = $DayVisits{ $year . $month . $day };
 +                                }
 + 
 +-#if (($DayPages{$year.$month.$day}||0) > $max_p)  { $max_p=$DayPages{$year.$month.$day}; }
 ++if (($DayPages{$year.$month.$day}||0) > $max_p)  { $max_p=$DayPages{$year.$month.$day}; }
 +                                if ( ( $DayHits{ $year . $month . $day } || 0 ) > $max_h ) {
 +                                        $max_h = $DayHits{ $year . $month . $day };
 +                                }
 +@@ -16617,7 +16617,7 @@
 +                                $average_k = $average_k / $average_nb;
 +                                if ( $average_v > $max_v ) { $max_v = $average_v; }
 + 
 +-                               #if ($average_p > $max_p) { $max_p=$average_p; }
 ++                               if ($average_p > $max_p) { $max_p=$average_p; }
 +                                if ( $average_h > $max_h ) { $max_h = $average_h; }
 +                                if ( $average_k > $max_k ) { $max_k = $average_k; }
 +                        }
 +@@ -16656,7 +16656,7 @@
 +                                );
 +                                my @valcolor =
 +                                  ( "$color_v", "$color_p", "$color_h", "$color_k" );
 +-                               my @valmax   = ( $max_v,   $max_h,   $max_h,   $max_k );
 ++                               my @valmax   = ( $max_v,   $max_p,   $max_h,   $max_k );
 +                                my @valtotal = ( $total_v, $total_p, $total_h, $total_k );
 +                                $average_v = sprintf( "%.2f", $average_v );
 +                                $average_p = sprintf( "%.2f", $average_p );
 +@@ -16717,10 +16717,10 @@
 +                                                  int( ( $DayVisits{ $year . $month . $day } || 0 ) /
 +                                                          $max_v * $BarHeight ) + 1;
 +                                        }
 +-                                       if ( $max_h > 0 ) {
 ++                                       if ( $max_p > 0 ) {
 +                                                $bredde_p =
 +                                                  int( ( $DayPages{ $year . $month . $day } || 0 ) /
 +-                                                         $max_h * $BarHeight ) + 1;
 ++                                                         $max_p * $BarHeight ) + 1;
 +                                        }
 +                                        if ( $max_h > 0 ) {
 +                                                $bredde_h =
 +@@ -16779,8 +16779,8 @@
 +                                if ( $max_v > 0 ) {
 +                                        $bredde_v = int( $average_v / $max_v * $BarHeight ) + 1;
 +                                }
 +-                               if ( $max_h > 0 ) {
 +-                                       $bredde_p = int( $average_p / $max_h * $BarHeight ) + 1;
 ++                               if ( $max_p > 0 ) {
 ++                                       $bredde_p = int( $average_p / $max_p * $BarHeight ) + 1;
 +                                }
 +                                if ( $max_h > 0 ) {
 +                                        $bredde_h = int( $average_h / $max_h * $BarHeight ) + 1;
 +@@ -17066,7 +17066,7 @@
 +                                my @vallabel =
 +                                  ( "$Message[56]", "$Message[57]", "$Message[75]" );
 +                                my @valcolor = ( "$color_p", "$color_h", "$color_k" );
 +-                               my @valmax = ( int($max_h), int($max_h), int($max_k) );
 ++                               my @valmax = ( int($max_p), int($max_h), int($max_k) );
 +                                my @valtotal = ( $total_p, $total_h, $total_k );
 +                                $average_p = sprintf( "%.2f", $average_p );
 +                                $average_h = sprintf( "%.2f", $average_h );
 +@@ -17115,13 +17115,13 @@
 +                                        my $bredde_p = 0;
 +                                        my $bredde_h = 0;
 +                                        my $bredde_k = 0;
 +-                                       if ( $max_h > 0 ) {
 ++                                       if ( $max_p > 0 ) {
 +                                                $bredde_p = int(
 +                                                        (
 +                                                                  $avg_dayofweek_p[$_] ne '?'
 +                                                                ? $avg_dayofweek_p[$_]
 +                                                                : 0
 +-                                                       ) / $max_h * $BarHeight
 ++                                                       ) / $max_p * $BarHeight
 +                                                ) + 1;
 +                                        }
 +                                        if ( $max_h > 0 ) {
 +@@ -17298,7 +17298,7 @@
 +                        $max_h = $max_k = 1;
 +                        for ( my $ix = 0 ; $ix <= 23 ; $ix++ ) {
 + 
 +-                               #if ($_time_p[$ix]>$max_p) { $max_p=$_time_p[$ix]; }
 ++                               if ($_time_p[$ix]>$max_p) { $max_p=$_time_p[$ix]; }
 +                                if ( $_time_h[$ix] > $max_h ) { $max_h = $_time_h[$ix]; }
 +                                if ( $_time_k[$ix] > $max_k ) { $max_k = $_time_k[$ix]; }
 +                        }
 +@@ -17309,7 +17309,7 @@
 +                                my @vallabel   =
 +                                  ( "$Message[56]", "$Message[57]", "$Message[75]" );
 +                                my @valcolor = ( "$color_p", "$color_h", "$color_k" );
 +-                               my @valmax = ( int($max_h), int($max_h), int($max_k) );
 ++                               my @valmax = ( int($max_p), int($max_h), int($max_k) );
 +                                my @valtotal   = ( $total_p,   $total_h,   $total_k );
 +                                my @valaverage = ( $average_p, $average_h, $average_k );
 +                                my @valdata    = ();
 +@@ -17334,9 +17334,9 @@
 +                                        my $bredde_p = 0;
 +                                        my $bredde_h = 0;
 +                                        my $bredde_k = 0;
 +-                                       if ( $max_h > 0 ) {
 ++                                       if ( $max_p > 0 ) {
 +                                                $bredde_p =
 +-                                                 int( $BarHeight * $_time_p[$ix] / $max_h ) + 1;
 ++                                                 int( $BarHeight * $_time_p[$ix] / $max_p ) + 1;
 +                                        }
 +                                        if ( $max_h > 0 ) {
 +                                                $bredde_h =
 +</code>
 +
software/awstats.txt ยท Last modified: 2013/09/19 16:40 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0