Any news when Google Analytics 4 support will be added - I know UA support is still available but without migration of UA it would be easier to start collecting under GA4 so the data isnt split. I see the API is described here User properties | Measurement Protocol for Google Analytics 4 | Google Developers so maybe this will be a starter. If no one has started then happy to take a look.
I may have misunderstood current support but any advice welcome on this front.
I second that. I keep getting warnings about discontinuation of UA, though it’s not clear to me from the message if UA will stop working or not. For reference, here’s the latest message:
Universal Analytics standard properties will stop processing data on July 1, 2023. To maximize historical data and to ensure that Google Analytics 4 (GA4) meets your specific needs, we recommend you make the switch to Google Analytics 4 now. This will give you the opportunity to customize the setup including using the latest site tag.
For any customer who does not set up a GA4 property with basic settings, starting in March, we will configure one with a few basic settings consistent with the existing Universal Analytics property; this includes certain conversion events, Google Ads links, and existing website tags.
For Universal Analytics customers whose websites are tagged with gtag.js or analytics.js (including through tag management systems like Google Tag Manager), we will create a connected site tag that will reuse existing tags when possible to send traffic to the new GA4 property. If you do not wish to have a GA4 property created and configured based on your Universal Analytics property and existing tags, you may opt-out.
This is something that we will have to plan out. I noticed that you mention that you are willing to take a look and work on it. If that is the case, please feel to do so. If you have questions, please feel free to ask them in this topic.
Apologies for silence, Lustre, networking and other issues all got in the way. Back on this strand of work so if still useful I will see what I can get working.
I’m circling back to this now after promising @mcuma that it would be in 3.0.1 and completely forgot. It’s not in 3.0.1.
In fact, looking at it now - it may be a heavy lift for us as we’re passing everything in query parameters and apparently GA4 uses json bodies instead.
I’m looking to make updates for this this week, but I don’t know at the onset how much of a breaking change this is going to be and if I want to introduce those changes in 3.0.
I don’t know if this’ll make it into 3.0 as it’s either a large update to the lua scripts we have (which isn’t going into 3.1) or adding HTML & configurations to the dashboard which seems odd for a patch release.
You can hot patch your systems in this way:
copy /var/www/ood/apps/sys/dashboard/app/views/layouts/application.html.erb to /etc/ood/config/apps/dashboard/views/layouts/application.html.erb
edit the file in /etc (not the file in /var!) adding this near the top.
replace abc123 with your actual tag id.
<%- tag_id = 'abc123' -%>
<%- unless tag_id.nil? -%>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= tag_id %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<%= tag_id %>');
</script>
<%- end -%>
With that update, the dashboard will pull your edited file with the GA scripts enabled instead of the default html that we ship.
Yea, for anyone else, I believe this patch will work for many past versions. The facility to override partials (you’re overriding our main application.html.erb partial here) has existed maybe forever.
The hot fix seems to be working - on our test instance so far. I went to the GA webpage and with their prompts created a new GA4 property based on the old UA property, and then used the “Measurement ID” for the “tag_id”. I’ll observe the behavior for the next day or two and if all is good put it to our production servers.