Software: Apache/2.2.22 (Debian). PHP/5.6.36 uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) Safe-mode: OFF (not secure) /usr/share/doc/awstats/html/ drwxr-xr-x |
Viewing file: Select action/file-type:
Adding extra reports using the ExtraSection featureThe AWStats ExtraSection features are powerfull setup options to allow you to add your own report not provided by default with AWStats. You can use it to build special reports, like number of sales for a particular product, marketing reports, counting for a particular user or agent, etc... Explanation on how to add/edit an Extra report in your config file Take a look inside the AWStats config file to find the following part: #----------------------------------------------------------------------------- # EXTRA SECTIONS #----------------------------------------------------------------------------- Read all explanation in config file after this point, they will explain you how to add an Extra report by adding an ExtraSection configuration in your config file, or just click here to jump to a copy of this explanation. Following examples are precious tutorials... Some examples of ExtraSection setup you can follow to build your own personalized reports: And for more usage examples (like more precise Search Engine Optimization, referrals by domain, ...), you can have a look at the very good page Antezeta AWStats Enhancements and Extensions page. Example 1: Tracking Product ordersImage your web site is an e-store that sells 80 different products. Each of them has an id. Imagine each time, someone make an order for product 49, the order.cgi script or order2.cgi script is called with, in URL query parameter, the id of the product, meanings that you get in your log file a hit that looks like this:
So this is how you need to setup your ExtraSection to track your product orders:
Example 2: Tracking Bugzilla most frequently viewed bugsThis is an example on how to setup your ExtraSection:
Example 3: Tracking Exit clicksAWStats shows you naturally the exit pages. However, you don't know where you visitor go after exiting your site since clicking on a link that point to an external link will log the viewed page on the external server and not on yours. If you want to track this, you can, using the ExtraSection and the awredir.pl tool (provided with AWStats).This tools must be used as a CGI wrapper. When called on 'A HREF' link, it returns to browser a redirector to tell it to show the required page. So, to use this script, you must replace HTML href tags that points to external web sites onto your HTML pages from
For your web visitor, there is no difference. However this allow you to track clicks done on links onto your web pages that point to external web sites, because an entry will be seen in your own server log like this record:
Then, you can add in AWStats a chart to track all call to awredir.pl with keys values taken from the "url=" parameter. You will get an independant chart, counting all external pages viewed by your visitor after exiting your site. To have this chart, this is how you must setup your ExtraSection:
Example 4: Tracking aborted downloadAborted downloads are reported in a log file by a 206 error, so this is how you need to setup your ExtraSection to add a chart for a such tracking:
Example 5: Tracking most requested domain aliasesYou have one website, but this web site has several domains named (for example the same site domain.com can be reached with urls domain.com,www.domain.com,www.otherdomainname.com,www.againadomainname.org,...). You want to know which domain alias is the most used.The first thing to do is to be sure the domain alias is recorded inside your log file. If you use Apache, you must use a personalized Apache log file that contains the %V tag. For example you can add in your Apache httpd.conf file a new Apache log format (This is the Apache directive, not AWStats, to define an Apache log format that contains the virtual domain):
After restarting Apache, your log format should look like this
When your web server log file contains the domain alias, you can now setup AWStats to use it. For this use a personalised AWStats log format and use the %extra1 tag at the same position where the domain alias is. For example, for your combinedv Apache log format, we will use:
Every tag defined by name extraZ (Z is a number, you can use as many tags as you need) can be used in any ExtraSection to extract the parameter. You can use the name extraZ as a criteria in the ExtraSectionFirstColumnValuesX parameter (X is number of the extra report, you can add as many report as you need) to tell AWStats to use value in log file at the place of the tag, as the key for your report. For example:
And result will be:
Example 6: List of top level 2 path under a directory /mydirSo this is how you need to setup your ExtraSection to add a chart for such a tracking:
There is a lot of other possible use for Extra Sections ... The following explanation is same than the one found in AWStats config file: #----------------------------------------------------------------------------- # EXTRA SECTIONS #----------------------------------------------------------------------------- # You can define your own charts, you choose here what are rows and columns # keys. This feature is particularly usefull for marketing purpose, tracking # products orders for example. # For this, edit all parameters of Extra section. Each set of parameter is a # different chart. For several charts, duplicate section changing the number. # Note: Each Extra section reduces AWStats speed by 8%. # # WARNING: A wrong setup of Extra section might result in too large arrays # that will consume all your memory, making AWStats unusable after several # updates, so be sure to setup it correctly. # In most cases, you don't need this feature. # # ExtraSectionNameX is title of your personalized chart. # ExtraSectionCodeFilterX is list of codes the record code field must match. # Put an empty string for no test on code. # ExtraSectionConditionX are conditions you can use to count or not the hit, # Use one of the field condition # (URL,URLWITHQUERY,QUERY_STRING,REFERER,UA,HOSTINLOG,HOST,VHOST,extraX) # and a regex to match, after a coma. Use "||" for "OR". # ExtraSectionFirstColumnTitleX is the first column title of the chart. # ExtraSectionFirstColumnValuesX is a string to tell AWStats which field to # extract value from # (URL,URLWITHQUERY,QUERY_STRING,REFERER,UA,HOSTINLOG,HOST,VHOST,extraX) # and how to extract the value (using regex syntax). Each different value # found will appear in first column of report on a different row. Be sure # that list of different possible values will not grow indefinitely. # ExtraSectionFirstColumnFormatX is the string used to write value. # ExtraSectionStatTypesX are things you want to count. You can use standard # code letters (P for pages,H for hits,B for bandwidth,L for last access). # ExtraSectionAddAverageRowX add a row at bottom of chart with average values. # ExtraSectionAddSumRowX add a row at bottom of chart with sum values. # MaxNbOfExtraX is maximum number of rows shown in chart. # MinHitExtraX is minimum number of hits required to be shown in chart. Warning: the ExtraSectionConditionX MUST use regex values since AWStats 6.0. ExtraSectionFirstColumnValuesX also need REGEX value for all AWStats versions. Return to examples for examples on syntax use. |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0387 ]-- |