OJS Usage Statistics

The codes suggested by @bozana, I inserted in template/frontend/objects/article_details.tpl
Using default and manuscript theme, abstract view stats displayed. However, when I change to Manuscript Jats the abstract view stat does not show. When you give this hint

All front-end is stored here: https://github.com/Vitaliy-1/defaultManuscript/tree/master/templates/frontend1
Thanks to OJS elaborated programming style you can easily transfer front-end the code between themes. Just find the code that is responsible for abstract views.

I think the same codes suggested can be inserted in https://github.com/Vitaliy-1/defaultManuscript/tree/master/templates/frontend/objects/article_details.tpl

How can I display abstract view stats using manuscript jats theme?

So you inserted this code in the article_detail.tpl in default manuscript theme and it worked but in jats manusctipt theme it is not working?

Yup…

Pengembangan perangkat pembelajaran matematika dengan pendekatan kontekstual budaya Lombok | Beta: Jurnal Tadris Matematika, no abstract view stats displayed

The code should work.

But I have commented out the original abstract field and placed it the JATS Parser Plugin here: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/templates/abstract.tpl

Maybe try put code there?

1 Like

Hi @Vitaliy thanks for that.
The abstract view stats displayed after inserting the codes in abstract.tpl
http://jurnalbeta.ac.id/index.php/betaJTM/article/view/83

Is it possible to display the abstract view stats in metrics?

Hi @bozana

Concerning abstract views = 0: Apparently you do not have any entries in your DB table metrics with assoc_type = 1048585 and assoc_id = 83 (the article example you are looking at) from this year. But there are some views for article 1, s. Efektivitas pembelajaran matematika melalui penerapan model pembelajaran kooperatif tipe snowball throwing | Beta: Jurnal Tadris Matematika.
You would need to investigate why are there no entries for article 83 – maybe they will come in a day or so…

I found no abstract view report except on 2016 publication

I am still waiting for another day for the abstract view stats to generate. In case, they don’t appear how I investigate this problem in DB?
I have also carefully read this thread Article statistics showing 0 abstract views and 0 PDF downloads especially on your recommendation.

Here I don’t understand

Maybe here as well, for the others to know: Your DB table usage_stats_temporary_records has some wrong indexes/primary key defined, which leads to the DB error duplicate primary key, so that statistics can not be inserted. You should remove the indexes and then move the unprocessed log files into the folder usageEventLogs, so that they can be processed again.

I also have revised the code (from (‘PublishedArticle’) → (‘article’)

$publishedArticle = $templateMgr->get_template_vars(‘article’);

I am planning to add this feature to my own site also.

@Vitaliy I hope you can share the codes later

Hi @bozana
As you said, the abstract view stats are displayed today. Beta: Jurnal Tadris Matematika
They were accessed yesterday. However, the abstract stats show 1 or 2 times meaning that older views history are not displayed as in 2016.
Do have any ideas why it happen?

Hi @kawahyu

Hmmm… I am not sure that I understand… For this article, for example, Efektivitas pembelajaran matematika melalui penerapan model pembelajaran kooperatif tipe snowball throwing | Beta: Jurnal Tadris Matematika, the abstract view count considers 2016 as well, correct?

Best,
Bozana

Hi @bozana

getViews() method gives too many views count. For example, an article that has 3149 views, according to Google Analytics must have not more than 1000 views.
It counts bots also?

Dear all,

I apologize that interfere in this question, but I was looking for opportunity to integrate some paper metrics functionality as on the discussed above website (for example Efektivitas pembelajaran matematika melalui penerapan model pembelajaran kooperatif tipe snowball throwing | Beta: Jurnal Tadris Matematika) in our developing journal site (which is based on OJS 3.0.2 - new installation, no migration from earlier versions). So, I would like to ask for more information, about how precisely can integrate such functionality in the OJS journal site? Is this a result of downloadable and installed free add-on plug-in (if so what is the name of the plug-in?), or is it a specially developed add-on module for this journal only?

Any help will be highly appreciated.

Thank you in advance!

Hi @quad5x5
It is plugin, namely Jats PluginParser plugin developed by @Vitaliy
I am just a journal editor, for further questions you can tag @Vitaliy

Greeting @quad5x5

You are asking about metrics? It is Usage Statistics plugin.

Dear kawahyu and Vitaliy,

Thank you very much for your quick response.

Vitaliy: May be I am not express my self very well, but I don’t looking for metrics tool actually. I think that OJS has integrated plugins for generating statistic reports in CSV format from administration. I actually was searching a way to visualize to the authors, visitors, etc of the journal, what is usage of the articles that will published in the journal-site: how many times the abstract has been read, how many times the PDF file has been seen, and so on…

And when I sow your plugin in action on jurnalbeta.ac.id (b.t.w. congratulations for a good job done !) I thought this is exactly what we need for our OJS journal. So I will send the information to our site-admin to try to install this JATSParserPlugin and modified default Manuscript theme and we’ll see what happens :grinning:

Thank you very much once again!

Hello, not really. I have been following daily. I compare with my daily visitors as well. It is perfect in my scenario. www.jmri.org.in

For visualising views you will need to apply changes in the OJS code discussed earlier in this theme.

As for my JATSParser plugin it is developed mostly for displaying a whole article in JATS XML format on article detaik page (under abstract).

So, why data from google analytics are differ? Have you compare them?

Yes, both were similar in my case. I can see that your articles have a way larger download than viewing metrics which but offcourse is a problem. I dont remember what all I had done to make my codes perfect. As far as I remember, Bozana helped me to do everything here.

Hi @Vitaliy

The bots are not counted.
getViews() should give the total count for an article (not only this year).
Maybe you could examine it for an article, a few log files and their counts in the metrics table…

Best,
Bozana

Hi again @bozana,

On my main page 33 latest articles are displayed. And for every on I use getViews method.
This manipulation slows page response by 2.5 times. On my testing machine it is 4500ms with getViews and 2000ms without.
I think the problem is in getting view count data from MySQL. What can be done in this case to increase performance?