Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-01-14 13:33:54

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Textpattern's file download count or AWStats?

Hi!

I recently launched a site for a non-profit for whom file downloads is a key statistic it uses to report to its donors. I pointed out that the list of files under the “Files” tab in Textpattern can be sorted by download count, and the host server has AWStats running.

The problem is that Textpattern’s file download counts do not agree with those AWStats. I can’t account for the discrepancy, and I’m not sure which number is more accurate.

For instance, Textpattern shows 429 downloads for File ID 11. AWStats shows 100 for January, 165 for December, and 1 for November, which is when the file went online— a total of 266 downloads. That’s 62% of the Textpattern total.

File ID shows 374 downloads in Textpattern. AWStats shows 71 for January, and 88 for December (none for November)— totaling 159. That’s 43% of Textpattern’s total.

  1. Can anyone explain why AWStats and Textpattern have different numbers for the same file?
  2. Is there a way to assess which count is more accurate?

Thanks!

Offline

#2 2010-01-14 13:51:00

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Textpattern's file download count or AWStats?

That’s a huge discrepancy. I’m only guessing because I don’t know AWStats, but could it be that they are filtering out hits from robots?


Code is topiary

Offline

#3 2010-01-14 14:13:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,642
Website GitHub

Re: Textpattern's file download count or AWStats?

In addition to what jsoo suggested (which can probably be kept in check with some choice entries in a robots.txt file) AWStats probably filters out duplicate downloads from the same IP address. In TXP, I believe a hit is a hit regardless where it came from. And it even counts a) your own downloads while testing, b) downloads that are clicked and cancelled (though it’s supposed to anul the latter, I don’t think it works on some hosts — someone might prove me wrong).

At the risk of being anti-TXP I’d say the AWStats are probably more accurate BUT I think it can backfire if you have people accessing your site from large corporations that share an Internet connection and thus have a single IP for the whole company; they might only count as one download.

How about using (TXP count + AWStats count) / 2)) :o]


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2010-01-14 16:23:38

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: Textpattern's file download count or AWStats?

Thank you Jeff, Stef! The foregoing makes a lot of sense. I can get specifics about the AWStats setup from the hosting provider. Cheers!

Offline

#5 2025-01-24 23:56:28

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: Textpattern's file download count or AWStats?

Hello! I wonder how to make sense of this today.

Based on the server logs, AWStats now says that a certain file got 5,457 in 2024. Textpattern logged 499 for that file during the same period.

Does Textpattern filter hits at all, as of v4.7.3?

Offline

#6 2025-01-25 09:52:14

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,827
Website GitHub

Re: Textpattern's file download count or AWStats?

Do the PDF files show independently in a Google search? (search for site:domain.com ext:pdf as you probably know). That might explain why AWStats shows different results to those logged by txp.

EDIT: To expand on that, my understanding is that Textpattern only counts downloads via the /file_download/123/filename.pdf link. Any direct link to /files/filename.pdf is not counted by txp, but this will be logged as a file access on the server.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2025-01-25 16:24:11

skewray
Member
From: Sunny Southern California
Registered: 2013-04-25
Posts: 216
Website

Re: Textpattern's file download count or AWStats?

I suspect that the txp counts are mainly people, while the awstats counts are mainly robots. What statistic do you want?

/files should be disallowed in robots.txt. That will help a bit with bots. Assuming Apache, Options -Indexes in .htaccess will prevent folder search, which will also help with bots. You could even disallow /files in .htaccess.

Last edited by skewray (2025-01-25 16:25:22)

Offline

Board footer

Powered by FluxBB