"New" Google Analytics connection

Hi everyone,

we are putting up a new OOD instance, and I am trying to connect Google Analytics to it. I am following https://osc.github.io/ood-documentation/latest/analytics/google-analytics.html, which I have done in the past for our production OOD instance, and which works fine.

But, Google Analytics now has a “new” way of setting this up, now using “Data Streams” inside of the “Property” and I am not able to get the monitoring traffic to get passed from our OOD instance to the GA.

The “old” GA just uses the “Property”.

Though, the gtag.js suggested by GA is essentially the same, e.g, for the “old” one:

and the new one:

In the new instance’s ood-portal.yml, I have:

analytics:
id: ‘G-FJGVXXXXXX’
url: ‘http://www.google-analytics.com/collect

I guess my first question is if anyone has done GA recently with the “stream” tracking - which would make me think that perhaps our OOD instance is not able to talk to GA due to some restriction in the route.

Or, if not, how can I troubleshoot this further. I.e. what does OOD do with the config in ood-portal.conf to generate the tracking tag.

Or perhaps we could see the traffic to the GA in the Apache logs somewhere?

Thanks,
MC

Has anyone done this recently with the “new” GA?

I opened New Google Streams is causing problems with analytics collection · Issue #886 · OSC/ondemand · GitHub to track this. We haven’t updated our GA snippet in a while and were not aware of this change.

Thanks Eric, looking forward to hearing what you find out.

Here are the gtag.js files that are visible. First the “old” GA on our production instance:

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

  gtag('config', 'UA-xxxxxxxxx-1');
</script>

And now the “new” one:

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

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

As you can see, they are pretty much the same.