Issue 45376: Migrate from Universal Analytics to Google Analytics 4

Assigned To:jeckels
Opened:2022-04-29 17:27 by jeckels
Changed:2022-06-24 15:10 by jeckels
Support Ticket: 
Pull Requests:platform#3484
2022-04-29 17:27 jeckels
Title»Migrate from Universal Analytics to Google Analytics 4
Assigned To»triage
Notify»willb;adam;Matthew Bellew;stuartm
Google is deprecating their "Universal Analytics" platform and will stop accepting new data on July 1, 2023. They're encouraging everyone to move to Google Analytics 4. It's possible to submit data to both in parallel to help with the migration and reporting conversion.

They have a number of migration documents including:

This will probably warrant a full spec when we're ready to tackle it, but at a high level will probably include:

1. Adding new options to our Analytics settings that pull in the new JS dependency and propagate the right context.
2. Updating servers that have custom analytics scripts.
3. Updating Content-Security-Policy headers to allow data pass-through.

Unsure of the best sponsoring budget so tagging a number of potentially interested parties.

2022-05-02 10:05 hannahb
Seems more like CI to me

2022-05-02 11:40 jeckels
I've been asked by one client about this already. I will add a new metric to give us info on where this is used to help prioritize.

2022-05-02 15:55 jeckels
New metric will be part of 22.6 and beyond. It's analyticsTrackingStatus in the Core module. "disabled" is the default and indicates there's no analytics enabled. "enabled" and "enabledFullURL" are both old-style Google Analytics. "script" is a customized analytics script that could be GA and/or anything else.

2022-05-16 13:32 Bernie
Thanks Josh. We will review this once we are receiving metrics.

2022-06-24 15:05 jeckels
Assigned Totriage»jeckels
I got customer pushback on my plan to make any real changes in 22.11 so I went ahead and got this working with GA4 and also changed the configuration to allow selecting multiple approaches at once. This will be useful to let servers double-report to old and new versions for a transition period.

2022-06-24 15:10 jeckels
Pull Requests»