1

Scenario: A have a client who has a small WordPress site (separate domain, but not multisite) within his hosting account that holds specific research information. The small site did not have Google Analytics installed, but the host does have AWStats installed.

Problem: For the first time in the several year life span of the site, my client would like to know how many views there have been on a certain PDF file.

I have never used AWStats, but it did not seem to be recording much file use. So I loaded the PDF twice on separate days to see if the stats would pick up the fact that I loaded the PDF. After updating the stats, more pages showed as being loaded, but not the PDF. The stats are also not showing images as loading, but it is showing that files like xmlrpc.php are being loaded (probably by hackers.)

Do you know if there is a way to get AWStats to show PDF loads?

  • 1
    I was a web host before I retired as well as a consultant for global telecoms specializing large-scale Internet services. AWStats, while popular and better than nothing, is terrible. I used Sawmill for BT and for my own hosting company, however, it is expensive. Today, I recommend Piwik found at piwik.org. You can load it on the server or on another machine and simply move the log files for analysis. Piwik is one of the very best available and FREE! Piwik should be able to answer your question for you. It should help you in general as a consultant and worth the install. Cheers!! – closetnoc Dec 17 '16 at 1:17
  • 1
    awstats is a log file analysis tool. If it isn't picking up on the file, just grep for it in the log files. – Stephen Ostermiller Dec 17 '16 at 1:19
  • While your comment is correct, the situation is that the client would like to be able to go into AWStats and look for himself whenever he wants to. He is not likely to grep the raw log files. – Nora McDougall-Collins Dec 17 '16 at 1:30
2

As long as your PDF files are hosted on the same server, they should appear in the server logs. The first step to diagnosing the problem would be to ensure that PDF views are being logged properly.

Once you have verified that they are in the log file, you can configure AWStats to record them as page views. According to the AWStats documention, the NotPageList controls the extensions that are not counted as pageviews. The default is

NotPageList="css js class gif jpg jpeg png bmp rss xml swf" 

You need to make sure that "pdf" has not been added to that list.

  • Someone at the host level must have made the change. I don't know whether it was based on my tickets to tech support (they told me to go to the raw log files) or my posting this question and complaining on Facebook. It is interesting that it's only picking up going forward. Sept - Nov are not picking up for PDF files. – Nora McDougall-Collins Dec 27 '16 at 23:43
  • To show anything retroactively awstats would need to be rerun against the log files for that time period with the new configuration. – Stephen Ostermiller Dec 27 '16 at 23:45
  • From your comment, I would assume that I can ask the host tech support to do that. I have hunted around and am not finding more than read privileges on the tool – Nora McDougall-Collins Dec 27 '16 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.