osulp / Scholars-Archive

ScholarsArchive@OSU, institutional repository for Oregon State University
https://ir.library.oregonstate.edu/
14 stars 3 forks source link

[Analytics] Direct-link file download to naturally work with Sufia stats #309

Closed revgum closed 7 years ago

revgum commented 8 years ago

update downloads_controller.rb set category, action, and label to match the format that Sufia expects for the stats page to draw out the counts from the GA.

category = "Files" action = "Downloaded" label = "sufia:#{params[:id]}"

zhang4952 commented 7 years ago

related #274. branch restored at https://github.com/osulp/Scholars-Archive/commit/68be5f141566cdca56064c201dd87fb6e7c20c37

zhang4952 commented 7 years ago

For the discussion of a 'good' solution, here is the Staccato tracker.rb: https://github.com/tpitale/staccato/blob/c77484d1ac01ab93559ab030611b3024db3f6c76/lib/staccato/tracker.rb that can be useful.

zhang4952 commented 7 years ago

Per the discussion at the check-in on July 31:

wickr commented 7 years ago

Current plan is to disable Hyrax Downloaded button event triggered by Javascript, and track all downloads through the downloads controller and send those stats to GA in the same form that Hyrax expects.