+ Reply to Thread
Results 1 to 6 of 6

Thread: How to obtain total number of attachment downloads

  1. #1
    Join Date
    Jan 2012
    Posts
    89

    Default How to obtain total number of attachment downloads

    I see the ability to view the popular pages determined by page count but what about attachments? Can we see the total number of attachment downloads? Is this data stored somewhere in the database? If not, can an extension of some sort be created?

    Thanks,
    Al

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Attachments are not tracked like pages. The best way is to track them is to analyze the Apache logs instead.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3
    Join Date
    Jan 2012
    Posts
    89

    Default

    Thanks for the super quick reply Steve! I'm using IIS on 2008 R2 so what would be the appropriate log to track this in? We'd like to present this in a report for management. Can this feature be submitted as an enhancement request? Would it be complicated for us to add in such an extension?

  4. #4
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Alas, my knowledge of IIS is limited, but I would expect there to be feature parity with Apache (and then some).
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  5. #5
    Join Date
    Jan 2012
    Posts
    89

    Default

    Yes I found the details in the logging for IIS and will try to configure the ODBC option to bring the attachment download stats into MSSQL. It will not exactly be a trivial process though. Google Analytics doesn't seem to show this eitehr. Can this be submitted as an enhancement request? I can't imagine that it would require a significant effort and is an important stat to have.

  6. #6
    Join Date
    Jan 2012
    Posts
    89

    Default

    In case anyone else is interested to know, I was able to obtain the total number of attachment downloads grouped by files using ODBC logging and a little SQL. Here is what I did:

    1. Configured ODBC logging for the IIS site on my 2008 R2 Server. You need to use the 32-bit SQL driver since this app is 32-bit and not 64-bit.

    2. With all my logging data now in a table called 'InternetLog' I am able to run the following which will show me a list of all the PDF and DOCX files that have one or more downloads sorted descending by total number of downloads for each file:

    Code:
    select SUBSTRING(target, CASE WHEN CHARINDEX('=', target) > 0 THEN CHARINDEX('=', target)+1 ELSE LEN(target) END, LEN(target)) as 'filename', COUNT (*) as 'total' from InternetLog where target like '%.pdf%' or target like '%.docx%' group by target order by total desc
    Essentially I select all the text to the right of the equals sign from the target field for the file name. Then I just count up the occurrences. I still think that this type of information should be handled in the product as IIS ODBC logging can be a substantial overhead, but this works for me.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts