Tuesday, March 29, 2005

Color depth statistics in Awstats

I'm a big fan of Awstats (a log file analyzer). However one of the miscellaneous statistics missing is color depth (and it seems it's been promised "in the next version" for a long time). If you use the awstats_misc_tracker.js file to track things such as screen size, javascript usage and flash capabilities, you may benefit from the tip below to track screen color depth.
Just add the following lines in your awstats.XXX.conf file, near the part where you configure the extra sections:
ExtraSectionName1="Color depth"  
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URL,\/js\/awstats\_misc\_tracker\.js"
ExtraSectionFirstColumnTitle1="Color depth in bits"
ExtraSectionFirstColumnValues1="QUERY_STRING,cdi=([^&]+)"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=P
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=5
MinHitExtra1=1

In a common-person oriented website I manage (as opposed to techies), 75% have 32 bit depth, 18% have 16 bit, 5% have 24 bit and 2% have just 8 bit (that's 256 colors). I'll have to use my screen in 16 bit mode once, so as to check how things look.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home