Support for Google Analytics 4?

670 views
Skip to first unread message

james.m...@gmail.com

unread,
Jun 8, 2022, 11:14:23 AM6/8/22
to DSpace Technical Support
Hello,

We are transitioning from Google's Universal Analytics (UA) to Google Analytics 4 (GA4) across our web properties.  Is GA4 supported by DSpace 6.x or 7.x?  It would appear from the DSpace documentation and configuration that only Universal Analytics is supported.  Any insight is welcomed!

Thanks!

James
University of Alabama

james.m...@gmail.com

unread,
Jun 8, 2022, 11:18:30 AM6/8/22
to DSpace Technical Support
p.s. Universal Analytics will stop processing new hits on July 1, 2023 (link).  If GA4 isn't currently supported in DSpace, is there a plan to support it in the future?

Tim Donohue

unread,
Jun 8, 2022, 2:52:38 PM6/8/22
to DSpace Technical Support
Hi James,

We recently had a ticket submitted about this for DSpace 7: https://github.com/DSpace/dspace-angular/issues/1672

The quick answer is that GA4 is not currently supported, but I'd expect it to be supported in DSpace 7 prior to July 2023.  (Currently, we only support Universal Analytics as you pointed out.) 

That said, the ticket is currently waiting on a volunteer developer, so if anyone reading this is interested, please let us know on the ticket.  Otherwise, I'll do my best to find a volunteer to solve this in either 7.4 or 7.5 (both of which will be released prior to July 2023).

Tim

Alejandro Lengua Vega

unread,
Jun 9, 2022, 7:56:22 AM6/9/22
to Tim Donohue, DSpace Technical Support
Hello,
I usually add Google Analytics code in the footer of Dspace pages.
What additional support are you looking for?

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/5db0a5f1-1db3-48d7-8170-49018ae6b291n%40googlegroups.com.

cristob...@gmail.com

unread,
Jul 13, 2022, 11:37:58 AM7/13/22
to DSpace Technical Support
Hi Alejandro,
    Could you help me by sharing an example code please? I would greatly appreciate it.

Thanks!


Cristobal Caris

unread,
Jul 27, 2022, 9:19:10 AM7/27/22
to DSpace Technical Support
Hi Alejandro,
Could you help me by sharing an example code please, we have a DSpace 6 Version ? I would greatly appreciate it.

Thanks!

Sylvester Chikoti

unread,
Feb 21, 2025, 6:50:14 AM2/21/25
to DSpace Technical Support
just copy javascript code provided by google for tracking, and paste it on the head section of the page-structure.xsl, make sure to put "=" in async for it to work otherwise it will break your system. it should be like this:

<!-- Google tag (gtag.js) -->
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=G-_ _  _ _ _"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-__ _ _ _ _');
</script>

regards
Reply all
Reply to author
Forward
0 new messages