How to find number of times a pdf has been downloaded from an item page

200 views
Skip to first unread message

Carolyn Sullivan

unread,
Mar 18, 2024, 5:40:02 PM3/18/24
to DSpace Technical Support
Hello,

Just wondering--how do we find the number of downloads of a pdf from a given item in DSpace?  If you click on 'Statistics' in the toolbar while accessing an item page, is the 'File Visits' section equivalent to 'Downloads'?

Thanks,
Carolyn.

Lrellis D'erth

unread,
Mar 19, 2024, 10:45:36 AM3/19/24
to DSpace Technical Support
A note to add to the above:

The 'File Visits' section from what we've seen so far doesn't appear to accurately reflect the number of actual downloads of a file.  From the back-end of Solr, we tried running a query with parameters as follows:

"params":{
      "q":"*:*",
      "indent":"true",
      "q.op":"OR",
      "fq":["owningItem: -Mysterious Unique Id for the item that owned the file of interest-",
        "bundleName:\"ORIGINAL\""],
      "rows":"1000",
      "_":"Thirteen-digit-number"}},

The results included at least four responses where staff had gone to the 'Edit' page for the item, but hadn't actually downloaded the file in question (we could tell because the responses include variables such as time and epersonid, the latter of which can be used to determine an authenticated user).  

So... is there any way to actually tell whether someone downloaded the file from the Solr logs?  As it stands, I'm not sure the 'File Visits' statistics are meaningful.

Thanks,
Carolyn.

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/eb4a0e3e-ed84-4af0-8cb2-c30637c68ad7n%40googlegroups.com.

DSpace Technical Support

unread,
Mar 28, 2024, 5:54:18 PM3/28/24
to DSpace Technical Support
Hi Carolyn,

The *intention* of the File Visits is to track file downloads.  However, I will mention that the built-in DSpace Statistics engine is not always the most accurate tool.  It sometimes will overcount bot activity and it may exclude hits from localhost.  I'd *love* for it to be much more accurate, but it honestly hasn't had as much attention from volunteers as other features....and we simply are not able to keep as up-to-date with filtering out bots as other statistical tools (like Google Analytics). 

So, if you want a rough estimate, it's likely good enough.  But, if you desire more accurate statistics, you'd probably want to use Google Analytics.  There's also some early discussion about supporting other Analytics services like Matomo (but no official work yet): https://github.com/DSpace/DSpace/issues/8414

Tim

Carolyn Sullivan

unread,
Jun 3, 2024, 3:45:24 PM6/3/24
to DSpace Technical Support
Thanks Tim :)  Follow-up question: So I've been asked to find how many times a file has been downloaded and its associated item page visited each year since the inception of the repository.  Since the existing the stats package just states it per month, I went into the Solr Statistics and ran this queries like this one: http://localhost:1234/solr/statistics/select?facet.field=id&facet=true&indent=true&q.op=OR&q=owningColl%3Aa35c7701-e11d-482c-8b3e-4b9cd69bdf4d%20AND%20type%3A2%20AND%20statistics_type%3Aview%20AND%20isBot%3Afalse%20AND%20time%3A%5B2018-05-01T00%3A00%3A00Z%20TO%202019-04-30T00%3A00%3A00Z%5D

(Ex. Would expect to change the type to 0 for bitstreams, and alter the date range to encompass different years)

It's really clunky to run the query for EVERY year though, get the counts of page views for every item id, copy and paste that into an excel file, and do that over and over again.  Would you or anyone else happen to know if Solr has any magical way to spit this out in a nice excel file for me, or if there's an easy way to plug a script into the Solr interface that would do that?  

Thanks,
Carolyn.

Reply all
Reply to author
Forward
0 new messages