I am new in pkp ojs system but I am given a server which works for ojs system which added Google Analytics code beforehand. Now, I have to change some setting for Google Analytics code but I can’t find the code due to the complexity of server files. May I know:
where probably the code lies on? html file? php file? js file?
If I can’t find it anymore, should I add Google Analytics code to the server file I prefer with my own ignoring the previous codes? What risk I may take from this action?
In OJS, Google Analytics is manged by a Generic Plugin:
User Home → Journal Manager → System Plugins → Generic Plugins → Google Analytics
Configure the settings there with your existing tracking code.
In the settings in OJS for the Google Analytics plugin - there is a field to enter “Account Number” - not the GA Tracking Code (as you suggest). Please confirm what should be entered in the OJS plugin settings- is it my overall Google Account number and NOT the individual tracking code I have for each journal?
The “Account number” is now named in Google Analytics as the “Tracking ID”, like “UA-1234567-00”.
In Google Analytics, navigate to the Admin panel, then select your Property, and find the “Tracking Code” option under “Tracking info”.
OK, so it’s now 2021. I activated the Google Analytics plugin, but it doesn’t give me the option of settings that I thought was supposed to be there. What am I missing?
What specific version of OJS are you using?
For 3.x, be sure to expand the plugin options after enabling it by clicking on the arrow on the left to reveal the “Settings”, “Delete”, and “Upgrade” options.
That option doesn’t show for me. Here’s what I see:
I’m logged in as the admin. I’m on 184.108.40.206
Are you in a multijournal site and trying to activate the plugin within the Site settings, rather than in the Website settings for each journal? I was able to reproduce this behavior in 220.127.116.11 in that case.
I was able to see and use the “Settings” option under the Journal’s Website Settings.
Ah, that makes sense. I have a multi-journal site. So I’ll need to enter the code for each one then?
Yes, you can use the same Tracking ID across multiple journals, or use distinct Tracking IDs for each journal.
The issue of the plugin not working at the Site level also appears in 3.1.x. I’ll open an ticket for this.
Thanks! I’ve activated it on all journals, with the same id for now. Really appreciate the quick response. I’ve been bashing my head against this for a while.