Google Universal Analytics, Google Analytics 4 and all MFEs

My next question is analytics based, but not necessarily Open edX based.

Currently in lms/templates/main.html there is a code snippet allowing site operators to collect traffic through Google Universal Analytics.

Google Universal Analytics is going away on July 1, 2023.

Will the code snippet be updated to support Google Analytics 4?

And since we are now in a more Micro Frontend friendly architecture, will the code snippet be added to each MFE so that operators don’t have to fork each MFE in order to add it if they want to follow traffic through the Learning MFE for example?

Who should I talk to?

Hi @sambapete ! This sounds like it fits under the purview of the data working group, so I’ve added it to the agenda for the next meeting.

GA is widely used and a very useful tool, and so I can’t see any reason why we shouldn’t continue to support it, and expand its usage into the MFEs.

1 Like

@sambapete, @jill,

I’ve been talking to @BrianMesick about this, and we think it’s important enough to warrant a new epic/discovery around it.

This is the draft description: Modular Web Analytics · Issue #148 · openedx/frontend-wg · GitHub. There’s precious little in there, yet, but it should be enough to get a conversation started. I don’t know if it’ll become an OEP, ADR, or just a PR somewhere, but whatever we do, if we want to continue supporting Google Analytics we need to do it by Palm.

Given the relative urgency, I think this is a good candidate for a funded contribution. I’ll have a talk internally to see if tCRIL would want to fund it ourselves.

Alternatively, if any core contributors want to pick this up to work using their monthly 20 hours, it would, of course, be awesome. :slight_smile:


It’s worth noting that there are two Univeral Analytics flavors - regular and the enterprise scale 360. Regular is the one that @sambapete is referencing above, while 360 will live on until July 1 2024. It’s not clear to me currently what the community uptake is on 360, but that is what is using so they may not feel the same time pressure as other parts of the community. However, I’m sure they would like better coverage for MFEs so that conversation is ongoing.

I’m happy to continue the technical portion of this conversation over in the Issue that Adolfo created, but just wanted to get this bit of context out to the wider audience.

1 Like

That’s an interesting point. Smaller site operators may not be able to afford 360 for example while someone as big as can.

I can tell you for sure that our site would never be able to afford the prices I’ve seen on What is Google Analytics 360? | FoundSM - Google Analytic Marketing Partner.

The cost of Google Analytics 360 starts out at $150,000 per year and billed at $12,500 a month. Costs can increase as well based on the size of the website. The cost also includes the full suite of tools in the Google Marketing Platform.