Describe the issue or problem
At the recommendation of some PKPers, I’m investigating using Metabase as an alternative to using the API to extract view stats from multiple instances of OJS. I suspect this isn’t possible I suspect that it isn’t possible because of the way OJS records usage events in log files, but I note field in the Metrics table that I can’t understand.
Steps I took leading up to the issue
- Go to Metrics folder
- Fail to under what some of the variables are
- Fail to find clarification under https://docs.pkp.sfu.ca/admin-guide/en/statistics
What application are you using?
Metabase v0.54.5
OJS 3.3.0.19
If it’s not possible to do this directly in Metabase, I’d love to know if you think it’s preferable to collect this data from the API or by processing the logs from across instances in another way. Thanks!
Hi @tmrozewski,
Not sure if you’ve seen this yet: https://youtu.be/yNaLREnmqRI?si=gxDJ159JQH3rHTaZ
But, it may be of some use.@asmecher has been working with Metabase so he may be able to provide some more direct guidance.
-Roger
PKP Team
I haven’t, thanks! I’ll check it out soon.
That video didn’t answer the question but it was otherwise interesting and informative.
@asmecher do you have an answer to the question above? Also, now that I’m getting Metabase set up for my stable of journals and have the capacity to get my hands dirty with it, I’d be happy to work with you on the initiative you mentioned. Right now I’m particularly interested in publishing system-wide analyses of publishing activity (issue and article publications per month, number of active journals in a given period, and both galley and abstract views per month).
Hi @tmrozewski,
OJS does not store view-by-view information about readership in the relational database – e.g. session ID 12345 viewed article ABC on date/time XYZ. Doing things that way would be too database-intensive. Instead, it processes statistics from flat-file logs into tallies by article and issue, by window of time (e.g. monthly), and, in the case of subscriptions and institutional subscribers, by institution. If you need finer-grained data than that, Metabase won’t be able to access it. However, if that’s all you need, then the metrics
table should give you access to it.
Regards,
Alec Smecher
Public Knowledge Project Team
Understood, thanks Alec. Aggregate data is great. I’m looking for documentation on how data is recorded that table - is Reader Statistics in the dev guide my best bet?
Hi @tmrozewski,
Maybe I can help with the DB table metrics and how you can read the data from it.
However I am not familiar with Metabase.
What information would you like to understand and/or get from the DB table metrics?
Best,
Bozana
1 Like
Hi @bozana thanks for the offer, I really appreciate it.
I’m trying to extract galley views and full text views/downloads from the Metrics table. My general sense of the table structure is that there is one row per metric per submission (per publication?) per day. However, I’m not sure exactly how these are coded in. The fields can’t parse are:
- PKP Section ID (is this just the journal section? “PKP” is throwing me off)
- Assoc Object Type (value is either “259” or blank)
- Assoc Object ID
- Representation ID
- Assoc Type (there are 4 distinct values there)
- Assoc ID
- File Type (looks like it’s “2” or blank)
Very grateful for any help you can give. If it’s easier, we can have a Zoom call and I can document the answers here for posterity’s sake.