HA4 Google Analitys for OJS 3.X

Hello.

Google Analitycs already requests that you add a code to be able to use Analitycs, my question is which file can I include it, can someone help me?

@marc me puedes ayudar? Gracias!

Hi @gardbeat,

The easiest solution is to install the Custom Header plugin from the plugin gallery; it allows you to add custom content to either the OJS header or footer.

Best regards,
Josh

@jnoronha link plugin? Thanks!

It’s in OJS 3 plugin gallery, you can find it under Website > Plugins. The plugin code is here.

Best regards,
Josh

  1. Use plugin described by “jnoronha” - Custom Header Plugin.
  2. Custom Header Plugin → Settings → Footer Content
  3. Add script (I am attaching bitmap because editor does not display text script)

PS.
For example: YOUR_GOOGLE_ID=G-35ELXDPBVX

@jnoronha and @UZRocznikFP thanks!!

To disable Google Analytics tracking, set the following window property to true:

window[‘ga-disable-G-35ELXDPBVX’] = true;

Please, take in consideration that if you are in the EU (or track EU users) you have to comply with GDPR and it is not as simple as adding a header or disabling tracking on the JS call.

This post makes a nice summary of what really need to be done:
https://www.cookieyes.com/blog/google-analytics-gdpr/

To use GA, you need to:

  1. Update your privacy policy: To datail what data is tracked.
  2. Accept Google’s Terms: be sure you can sign an agreement with google on behalf of the jourrnal.
  3. Audit your web pages for PII (personally identifiable information).
  4. Anonymize IP addresses.
  5. Set data retention settings.
  6. Set data deletion requests.
  7. Add a cookie banner.
  8. Limit data sharing.
  9. Restrict data collection for advertising features.

Otherwise, you are illegally tracking users.

To warn about this, PKP’s Technical Committee made the following recommendations:
https://pkp.sfu.ca/2022/04/21/google-analytics-privacy-practices-challenged/

1 Like