How to track jpg requests as pageviews in awstats 7.0

I have setup awstats to read cloud mode log files, and I need to be able to generate reports for specific files that are iamges used for banners. I changed the "NotPageList" options to exclude image files, and I deleted the awstats * .txt data files and launched the new -update, but jpg images are still not counted as pages. What do I need to do to make this work?

LogFile="/var/log/cloudfront-logs/mydomain.log" LogFormat="%time2 %cluster %bytesd %host %method %virtualname %url %code %referer %ua %query" LogSeparator="\t" SiteDomain="d2fxxxxxx.cloudfront.net" HostAliases="d2fxxxxxx.cloudfront.net" NotPageList="css js class bmp ico rss xml swf" DecodeUA=1 
+6
source share
1 answer

It seems that there are additional criteria for the request to be a “page” defined by the mime type in awstats, which is not documented. So, to fix this for my local installation, I hacked code to remove this mime type test.

AWStats 7.0 build 1.971 awstats.pl line 18219

Before:

 if ( $NotPageList{$extension} || ($MimeHashLib{$extension}[1]) && $MimeHashLib{$extension}[1] ne 'p') { $PageBool = 0;} 

After:

 if ( $NotPageList{$extension} ) { $PageBool = 0;} 
+4
source

Source: https://habr.com/ru/post/892183/


All Articles