uPortal-Project / uPortal

Enterprise open source portal built by and for the higher education community.
https://www.apereo.org/projects/uportal
Apache License 2.0
272 stars 273 forks source link

fix: added fn configureDefaults() to up-ga.js #2849

Closed bjagg closed 4 weeks ago

bjagg commented 1 month ago
Checklist
Description of change

Default GA configuration is not being set. This change adds setting the defaults as global values.

Use of archaic JS compressor prevents use of modern ES6. Will be addressed in uPortal v6, but for now the code was rewritten in an older style that matches the rest of the file.

https://developers.google.com/analytics/devguides/collection/ga4/reference/config#:~:text=Set%20to%20'auto'%20(the,example.com%20for%20the%20domain.

mhuffsti commented 1 month ago

@bjagg I went ahead and did a quick functional test. I focused on cookie_domain which is what started all of this, and it worked as expected this time with the updated JS file.

jgribonvald commented 1 month ago

Hi folks, just my 2 cents from european side. Our Protection Data Officers doesn't want to see any Google analytics scripts loaded like initialized even if the configuration is empty. It would be great if this part would be inside an optional stuff, like a jsp portlet code that we won't load by removing the portlet def. I have the same problem with using some CDN links like for google fonts. Google has trackers on. Analytics are usefull, but it should be managed at a custom way, with an organization platform. So that we host the apps that collect datas and that we provide anonymous stats. We can find alternatives to GA without problems 😉

ChristianMurphy commented 1 month ago

Analytics are usefull, but it should be managed at a custom way, with an organization platform. So that we host the apps that collect datas and that we provide anonymous stats. We can find alternatives to GA without problems 😉

Related, I've had pretty good experiences with Matomo https://matomo.org/ Which is both self-host-able and GDPR compliant.

jgribonvald commented 1 month ago

Analytics are usefull, but it should be managed at a custom way, with an organization platform. So that we host the apps that collect datas and that we provide anonymous stats. We can find alternatives to GA without problems 😉

Related, I've had pretty good experiences with Matomo https://matomo.org/ Which is both self-host-able and GDPR compliant.

Matomo is largely deployed in France ;)

bjagg commented 4 weeks ago

This PR is focused on a configuration omission. Thanks for the code, @ChristianMurphy.

I'll open an issue about making GA optional and having other solutions.

You guys are awesome!

bjagg commented 4 weeks ago

Yes, looks like the linter and the compressor conflict. Going to revert to the previous version and capture this suggestion as a future issue once we upgrade the JS tooling.