Tuesday, August 25, 2015

How to Track Image Hits With AWStats


Connect to your Web server by using either your Web host's file manager or a File Transfer Protocol (FTP) application.
Navigate to the directory that contains your AWStats installation. Most Web hosting companies install the program in an 'awstats' folder in the root directory of your Web server. If you cannot find such a directory, contact your Web hosting company to get the exact location of your AWStats installation.
Download the 'awstats.yourdomainname.conf' file in that directory, where 'yourdomainname' is the actual domain name of your Web site.
Right-click on your file once you have downloaded it to your hard drive, select 'Open with...' and click on 'Notepad.'
Copy-and-paste the following code at the end of the file:ExtraSectionName1='Image Hits'ExtraSectionCodeFilter1='200 304'ExtraSectionCondition1='URL,.(jpe?g|gif|png)$'ExtraSectionFirstColumnTitle1='Image'ExtraSectionFirstColumnValues1='URL,^(\/.*.(jpe?g|gif|png))$'ExtraSectionFirstColumnFormat1='http://www.yourdomainname.com%s' TARGET='_blank'>%s'ExtraSectionStatTypes1=HBLExtraSectionAddSumRow1=1MaxNbOfExtra1=100MinHitExtra1=1Replace 'yourdomainname' with the domain name of your website. Save the file by pressing CTRL and S at the same time on your keyboard.
Upload the saved file to your Web server, in the same folder where you downloaded the original file. Press 'Yes' when the program asks if you want to replace the original file. A new 'Image Hits' section will now appear in your AWStats interface.
VPS Hosting

No comments:

Post a Comment