Status of Google Analytics or other user tracking

We are getting to live with our OOD servers and would like to be able to tell what our usage is and maybe get an idea if users are coming back or not finding it useful. So, I tried to setup Google Analytics based on the documentation
https://osc.github.io/ood-documentation/latest/analytics/google-analytics.html

The first problem I ran into was the lack of a description on how to properly setup the GA account, but I am now realizing that may be the case because GA has radically changed since that documentation was put into place.
I then found the discussion that Martin Cuma created in Feb. of 2021 as well as the linked GitHub issue

That issue hasn’t had any updates for over a year.
Is there any way to get OOD to use GA today or is that code and documentation useless now?

If GA doesn’t work then what are other sites doing for tracking usage?

Hello and welcome!

What OS are you on and what version of OOD are you using?

Just so I’m clear, you already set the ood_portal.yml using the G-FJGVXXXXXX format and rebuilt the apache config and restarted httpd but the analytics failed to connect?

The place this is handled can be seen here:

And so it is just using that setting to handle the format it would seem, but maybe I’m missing something.

I’m using CentOS 7 and OOD 2.0.23. I have created the ood_portal.yml file

analytics:
url: ‘http://www.google-analytics.com/collect
id: ‘G-3P********’

I’ve enabled debuging and I can see in the logs that the wget is at least attempting to post some data:

[Thu May 26 10:53:59.048634 2022] [lua:debug] [pid 26134:tid 140151527290624] @/opt/ood/mod_ood_proxy/lib/analytics.lua(84): [client 138.67.168.10:51256] Analytics input: ‘v=1&t=pageview&id=G-3P*********&cid=mrobbert%40ondemand-dev.mines.edu&uid=mrobbert%40ondemand-dev.mines.edu&uip=138.67.168.10&ua=Mozilla%2f5.0+%28Macintosh%3b+Intel+Mac+OS+X+10_15_7%29+AppleWebKit%2f537.36+%28KHTML%2c+like+Gecko%29+Chrome%2f101.0.4951.64+Safari%2f537.36&de=utf-8&ul=en-us&dh=ondemand-dev.mines.edu&dp=%2fpun%2fsys%2fdashboard%2factivejobs&cd1=mrobbert&cd2=fe9022da1aa83ccb4cffc2d315f7ecff5a74e80d&cd3=2022-05-26T16%3a53%3a59Z&cd4=mrobbert&cd5=GET&cd6=200&cd7=https%3a%2f%2fondemand-dev.mines.edu%2fpun%2fsys%2fdashboard%2fbatch_connect%2fsys%2fbc_desktop%2fwendian%2fsession_contexts%2fnew&cm1=59&cm2=0’, referer: https://ondemand-dev.mines.edu/pun/sys/dashboard/batch_connect/sys/bc_desktop/wendian/session_contexts/new
[Thu May 26 10:53:59.048678 2022] [lua:debug] [pid 26134:tid 140151527290624] @/opt/ood/mod_ood_proxy/lib/analytics.lua(85): [client 138.67.168.10:51256] Analytics output: ‘2022-05-26 10:53:59 URL:http://www.google-analytics.com/collect [35/35] → \"/dev/null\" [1]’ [26.652 ms], referer: https://ondemand-dev.mines.edu/pun/sys/dashboard/batch_connect/sys/bc_desktop/wendian/session_contexts/new

The problem is I don’t know what to do on the GA side to see if the data is actually getting sent and interpreted. I got the tracking_id by creating a Stream inside of a GA property and it gave me a Measurement ID, but their instructions for adding that to a site is to use a gtag.js that includes the URL https://www.googletagmanager.com/gtag/js?id=G-*******
I tried changing the URL in ood_portal.yml to that one, but the log indicate the data isn’t accepted.
I also have no idea where to enter the extra dimensions that the documentation describes.
All the documentation on the GA side seems to indicate that UA-***** id have been deprecated and replaced with the new GA4 protocol.

Mike

Michael,

messing around with the Google Analytics interface a few months ago, I found out that GA now allows you to generate the UA* ID in the old format. I don’t remember the steps now but I think if you look around you should be able to find it. It’s somewhere in the settings for the GA instance. If you can’t find it let me know and I’ll look around.

MC

Thanks Martin! I was able to find the button to enable the generation of a UA ID. Along the way I noticed that UA is going to be turned off in July 2023 and will no longer collect data after that date so hopefully there is development in place to replace UA with GA4.
For others that want to do this the instructions for that part can be found here:

Note that it must be done at creation time. The advanced settings link is not that once the property has been created.