Adding Google Analytics to dSpace

106 views
Skip to first unread message

Camilo Freire

unread,
Jul 1, 2020, 5:56:49 PM7/1/20
to dspace-c...@googlegroups.com
Hi:

I would like to add Google Analtyics to a DSpace 6 with jspui. In the documentation I've found that it would be two different places in which the configuration of Google Analytics could be added: in de config/dspace.cfg file, changing the jspui.google.analytics.key variable and config/modules/google-analtyics.cfg. My goal is to attach my dSpace to a Google mail account so I suppose that the first is the correct one.

I gould like to know:

1) is it enough to set the jspui.google.analytics.key in the dspace.cfg file in order to attach Google Analytics to my account?
2) should I re compile dSpace in order to make the changes work?

Thanks in advance
Camilo Freire


Jose Miguel Santana

unread,
Jul 2, 2020, 12:38:07 PM7/2/20
to DSpace Community
Hi,

1) Yes. As soon as you configure your Google Analytics Key, it's inserted as JS code in the HEAD section of every JSP page. At least in DSpace-CRIS 5.10 (JSPUI) works that way
2) If you edit the final destination of dspace.cfg (for example /usr/local/dspace/dspace.cfg) you just need to restart Tomcat. If you edit your source code, you need to recompile in order to propagate changes to final destination. I prefer last option.
Reply all
Reply to author
Forward
0 new messages