Skip to content Skip to sidebar Skip to footer

How to Add OJStat FlagCounter and Visitor Online to OJS


All OJS-based Journals can use OJStat to display the visitors online and FlagCounter by following the steps below. First, let us see what is visitor online and flag counter in OJStat are.

Visitor Online

Visitor Online is a widget provided by OJStat to display the number of online visitors who are visiting your journal at current time.

FlagCounter

FlagCounter is a widget provided by OJStat to display the number of visitors based on their countries. It is like the popular FlagCounter that you might have known. The difference is that by using OJStat FlagCounter, you do not have to link out to other website.

Here is how your Visitor Online and FlagCounter widgets will appear if you put them on the sidebar (the blue box is not included):


Beautiful? Of course, I made it.

How to add FlagCounter and Visitor Online widget to OJS-based Journal

To use the widget, you need to install OJStat first. If you are new to OJStat, it is a free and lightweight Statistics counter app for your OJS-based journals. You can download and read the instructions from OJStat Official Page.

Assume that you have installed OJStat and add your journal to OJStat so that OJStat starts recording visits on your journals, you then need to download OJStat FlagCounter. Then, follow the steps below:

  1. Extract OJStatFlagCounter.zip to your local machine (you will find 3 files in the folder).
  2. Login to cPanel and locate your ojstat directory (in OJS root directory).
  3. Upload (a) flagcounter.php, (b) OJStat.js, and (c) OJStathome.js into ojstat folder (replace the b and c files).
  4. Login to your journal as journal editor or administrator.
  5. Go to settings->website->plugins.
  6. Scroll down and find Custom Block Manager (which is under Generic Plugins).
  7. Click Manage Custom Blocks.
  8. Add a block if you don't have one. If you have one, you can put the widget code whenever you want.
  9. Copy the widget code below.
  10. Paste the code to the Block that you just have created.
  11. Save changes.

Here are the Online Visitor and FlagCounter widget code:

<iframe id="onlineWidget" width="100%" height="55" frameborder="0" scrolling="no"></iframe><iframe id="flagCounter" width="100%" height="400" frameborder="0" scrolling="no"></iframe>

Please bear ini mind that only one FlagCounter and Visitor Online widget can be added to your OJS page. If you add more than one widgets, only the first widget will appear.

Please, only relevant comments are accepted. Comments that are irrelevant and/or containing active links will be deleted. Thank you.

Post a Comment for "How to Add OJStat FlagCounter and Visitor Online to OJS"