An OJStat widget is an element showing the statistics of the journal, including online visitors, total visitors (yearly, monthly, and the current month), visitor geo-statistics, etc. Using OJStat widgets is optional. When you want to use the widget, you will need to add the OJStat widget script after the main script in the OJS header (settings->distribution). However, the widgets may fail to load, and this article will tell you why.
We need to understand that there is a significant difference between the widgets in the OJStat 0.1.4 (2026) and the older versions. In the older versions, the widgets are wrapped in an iFrame. Meanwhile, in the 0.1.4 version, they are simply divs.
There are two ways that the widgets fail to load. First, you will see nothing at all. Second, the widget may load, but the data fails to load. When the first is the case, it is so because your OJS strips empty HTML elements. Since the widgets are divs with content loaded via JavaScript, OJS will identify them as empty elements. This is particularly when the minifier in the OJS config.php is on. To overcome this, you can add in the div (edit using HTML mode). When the second is the case, it is so because you lack a secure connection. The widgets will not load unless with HTTPS. Once you load the journal with HTTPS, the widgets return.
I hope this helps.

0 Comments