Google Analytics for Dataverse - compatible with Google Universal Analytics?

143 views
Skip to first unread message

Eunice Soh

unread,
Dec 14, 2021, 2:59:15 AM12/14/21
to Dataverse Users Community
Hi all,


Just to check, is analytics-code.html for Google Analytics written for Google Analytics 4,  Universal Analytics, or is compatible with both?

I'm looking at the Google Universal dashboards, and am not seeing the button clicks events defined in analytics-code.html pop up. I'm thinking that analytics-code.html only works with GA4. Wondering if that's true.

Thanks in advance for your insights.

Kind regards,
Eunice


Eunice Soh

unread,
Dec 14, 2021, 3:04:16 AM12/14/21
to Dataverse Users Community
Just to add I'm running on Dataverse v5.5, and using the analytics code provided by Dataverse, I think for an older version. Definitely not the one shipped with the latest release v5.9. Perhaps I also need to update analytics-code.html too, to resolve this issue.

Seeing some recent github PRs as well on this https://github.com/IQSS/dataverse/issues?q=%22google+analytics%22

James Myers

unread,
Dec 14, 2021, 8:23:16 AM12/14/21
to dataverse...@googlegroups.com

Without looking into it more, I’m not sure about which versions of analytics this works with. I do know that the earlier versions of the analytics-code.html file do not capture events from the file table kebab menus (the ones for individual files). They should work with the dataset-level download all button, etc. though. You can check in the browser dev console and would see an error when you click download (for example) in those drop-down menus.

 

The new analytics-code.html file will work with older Dataverse versions (not sure how far back but several versions at least) so you could/should try that.  If you look in the browser console, you can verify that with the updated file in place, you no longer get an error.

 

-- Jim

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-commu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/7c881ed9-52ab-456a-a862-07ef0a3717den%40googlegroups.com.

Eunice Soh

unread,
Dec 14, 2021, 9:23:22 PM12/14/21
to Dataverse Users Community
Thanks Jim for your advice! I'll continue troubleshooting, using the browser console, and check after updating to the newest code. 

Eunice Soh

unread,
Dec 16, 2021, 12:47:19 AM12/16/21
to Dataverse Users Community
Just to update that analytics-code.html shipped with v5.9 docs and the associated button clicks appears to work with Google Analytics 4.
Reply all
Reply to author
Forward
0 new messages