Klaro and Google Analytics

16 views
Skip to first unread message

Julia Gilmore

unread,
Feb 4, 2026, 1:18:48 PM (15 hours ago) Feb 4
to DSpace Technical Support
Hi DSpace community, 

We would like to clarify if/how the Klaro consent pop-up impacts site statistics.

Specifically, if Google Analytics is set up for a DSpace site but a visitor leaves the “Statistical > Google Analytics” option turned off in the Klaro pop-up, would that prevent their visits from being recorded in Google Analytics? 

Thank you, 

Julia


Klaro pop up - Information that we collect.png

DSpace Technical Support

unread,
Feb 4, 2026, 3:03:29 PM (14 hours ago) Feb 4
to DSpace Technical Support
Hi Julia,

Yes, if a user opts out of Google Analytics tracking then their visits will not be recorded in Google Analytics.  This was added to align with privacy regulations like GDPR, as those regulations require an ability to opt-out of any non-required "tracking" cookies.  As the Google Analytics tracking cookie is not required to make DSpace function, users are able to opt-out of it.

The logic for this is all in the "google-analytics.service.ts" class in the frontend.

Tim

Julia Gilmore

unread,
Feb 4, 2026, 3:41:49 PM (13 hours ago) Feb 4
to DSpace Technical Support
Hi Tim, 

Thank you for this speedy and informative (as per usual) response! 

To further confirm our understanding, from testing, it looks like users need to opt in to being tracked by Google Analytics (by default, Statistical service tracking is not toggled on). Is it possible, if an institution desired, to change the default so users need to opt out

Thanks again :) 

Julia

DSpace Technical Support

unread,
Feb 4, 2026, 4:14:16 PM (13 hours ago) Feb 4
to DSpace Technical Support
Hi Julia,

In that case, I'd recommend a bug ticket.  I *expected* it to be "opt out" by default as well.

If it's not behaving that way, then I'd consider that to be a bug.  I don't recall a past decision to make it "opt in" only, and I also don't recall a way to configure the default behavior differently (but hopefully someone will correct me if I'm forgetting something here).  So, it's probably best to create a bug ticket because it likely will require a change to existing code (either to make it configurable or switch it to "opt out" by default).

Tim

Reply all
Reply to author
Forward
0 new messages