How Open edX with Google Analytics 4 works and where it fits
If your team wants web analytics on an Open edX site, the first question is whether Google Analytics 4 is acceptable for your learners and your privacy obligations. edx-platform supports GA4 in most LMS templates and in micro-frontends, so the integration is a configuration decision, not a plugin install. You settle which pages load the tag, which identifier you pass, and what your consent setup allows before anything is switched on.
The choice of GA4 is largely settled for you. Google turned off Universal Analytics for non-360 customers on 1 July 2023, so a team starting now is working with GA4 or with a different tool. The configuration reference is the Open edX page Configure Google Analytics, which describes the settings that enable the tag. Confirm against that page and your Open edX release which templates and micro-frontends pick up the tag in your deployment, because coverage is described as most templates rather than all of them.
This section does not cover Aspects learner analytics, which captures tracking logs as xAPI statements and presents them in Superset dashboards, and it does not cover self-hosted Matomo. Those tools answer different questions about course progress and learner behavior, and they carry different privacy and hosting trade-offs. Decide early whether GA4 is the web analytics layer, a complement to Aspects, or a reason to choose a self-hosted option instead, because that decision shapes the consent and data-sharing review that follows.
What you need before enabling Google Analytics 4
Enabling Google Analytics 4 on Open edX touches three things: a measurement property your organization owns, a platform you can change, and a privacy decision made before the first tag fires. Settle these in order, because the template work and the consent wording both depend on who owns the property and what data it will receive.
A GA4 property your organization owns
Create the GA4 property under an account controlled by your organization, not a personal Google account or an agency's account. Record the measurement ID (the G- identifier GA4 issues for a web data stream) and the people who hold Owner and Editor roles. Ownership decides who can export data, change retention, and remove the property if the contract with your partner ends. Confirm that the data stream's domain matches every LMS and micro-frontend hostname you plan to serve.
Access for the people who configure it
Name the people who will change the setting, edit templates, and review reports, and grant each the smallest GA4 role that covers the task. Configuration usually needs someone with Editor rights on the property and someone with server access to the Open edX deployment. Keep one named owner per side so a template change and a property change are never made by an unknown account. Record who can revoke access when someone leaves.
A deployed instance with editable templates
You need a running Open edX instance where your team can change the LMS and micro-frontend templates that load the analytics tag. Confirm which named release you run, since the Open edX release notes state that only the latest named release is supported, and Verawood is the current named release. Confirm the configuration keys and template locations in the Open edX docs for that exact release before you edit anything, because they can change between releases.
A staging environment to test tags
Plan a non-production environment built from the same Tutor configuration as production. Use it to confirm that page views, enrollment pages, and the course player fire the expected events and that the tag does not load on pages it should skip. Check that a staging property or data stream is separate from production so test traffic does not contaminate reports. Note who signs off the change before it moves to production.
A consent and data sharing decision record
Before turning the tag on, write down what GA4 will receive, which regions and learner groups are in scope, and whether learners in those regions must give consent before the tag loads. Record the legal basis your privacy team relies on, how consent is captured and stored, and how a learner withdraws it. Identify any learner data, such as account identifiers or course names, that must stay out of analytics parameters. Have legal or privacy review the record and keep it with the configuration change.
Retention and deletion settings
Decide how long GA4 keeps event-level data and who approves changes to that period. Check the retention options available on your property and the deletion process for individual learner requests, since GA4 is a third-party processor for any data it receives. Confirm with your privacy team whether a separate analytics store, such as one run in your own infrastructure, is needed for learner-level reporting. Ask your partner to document where the setting lives so it stays reviewable after handover.
How to configure GA4 in the Open edX LMS and micro-frontends
This sequence takes a GA4 property from creation through a verified tag on a staging Open edX instance, so the team knows which pages report and what the data stream receives before production is touched.
Confirm the GA4 property and data stream
The analytics owner confirms or creates a GA4 property for the learning platform and adds a web data stream for the LMS domain. Record the measurement ID that GA4 shows for that stream, and note which domains the stream covers. Ask whether the property already receives data from other sites, because mixed traffic makes course-level reports harder to read. The step is done when the measurement ID is written down and the owner can open the stream's settings page in GA4.
Check the Universal Analytics setup before changing anything
Platform operators should confirm that no legacy Universal Analytics tag or property is still wired into the templates or theme. Google turned Universal Analytics off for non-360 customers on 1 July 2023, so a leftover setting produces no useful data and can cause confusion during testing. Search the custom theme and any overridden templates for old tracking snippets. The step is done when the team can name the single analytics tag that will remain after the change.
Set the measurement ID for your deployment method
The platform engineer finds the GA4 configuration key in the Open edX guide that matches the deployment method, whether Tutor or another method, and sets the measurement ID in the settings for that environment. Confirm the exact key name in the linked Open edX configuration guide rather than relying on a name from a forum or older blog post. Keep the value in the same configuration source used for other site settings so that staging and production can be compared. The step is done when the setting is saved in the staging configuration and the change is recorded in version control or the team's change log.
Enable the setting in the LMS templates and micro-frontends
The engineer confirms which LMS templates and micro-frontends support the GA4 setting in the Open edX release the platform runs, since support is listed for most templates and micro-frontends rather than all of them. Apply the configuration, rebuild or redeploy the affected components, and note any page that does not load the tag so it can be reported as a known gap. The step is done when the team has a written list of pages that report and pages that do not.
Deploy the change to a staging instance
The platform team deploys the configuration to a staging instance that mirrors the production hostname pattern and login flow as closely as possible. Staging should use a separate GA4 data stream or a clearly marked test setting, so test visits do not mix with learner data. Ask the team to confirm that the staging build contains the new configuration and that no production measurement ID is present. The step is done when the staging site is running the new build and the team can reach the pages listed in the previous step.
Verify the tag in browser developer tools
A tester loads the staging LMS pages, a course outline, and a micro-frontend page in a browser with developer tools open. The tester checks the network panel for requests to Google's measurement endpoints and confirms that the measurement ID in the request matches the one in the configuration. Repeat the check after signing in and after signing out, because some pages render differently for each state. The step is done when every page on the reported list shows the expected request and no page sends the tag with an unexpected ID.
Confirm events in GA4 DebugView
With the GA4 DebugView enabled for the staging stream, a tester performs a short sequence of actions such as opening the course page, starting a page navigation, and signing out. The tester confirms that matching realtime events appear in DebugView with the expected page and device details. Any event that fails to appear is logged against the page and the template it uses. The step is done when the tester signs a short record listing the verified pages and events, and the team agrees that the setup is ready for the privacy review before production.
How a learner page view reaches Google Analytics 4
A page view starts in the learner's browser when the LMS template or micro-frontend loads. The GA4 tag only fires if the consent check passes, so the consent decision sits between the platform and Google. Check that the tag stays silent when consent is declined and that the only data leaving your boundary is the data you agreed to send.
Page views leave the platform only after the consent check passes.
Which pages and events report to GA4
This table maps the main Open edX page types to whether they are expected to report to GA4 in the supported LMS templates and micro-frontends. Coverage varies by template, theme and release, so treat each row as a hypothesis to test in your target release. The main takeaway is that a checked box in the documentation does not prove that a given page sends the events your analysts expect.
| Page type | Expected GA4 reporting | What to test in the target release |
|---|---|---|
| Course outline | Depends on template and whether the page is server-rendered or a micro-frontend | Load the outline as enrolled and anonymous users, confirm page_view events and check the measurement ID is present in the page source |
| Courseware (unit pages) | Depends on the LMS template in use; verify on your theme | Open a unit with video and problem components, confirm page views fire and check whether component interactions produce any events |
| Learner dashboard | Expected in micro-frontend pages; confirm against your release | Log in, load the dashboard, confirm the tag loads once and does not duplicate after client-side navigation |
| Discussion forums | Often not covered by default; confirm in your release | Post and read a thread, check whether any events appear and whether post content could leak into URLs or parameters |
| Instructor pages and dashboard | Unclear; treat as untested until verified | Load instructor views as a staff account, confirm which pages send data and confirm no learner identifiers reach GA4 |
| Sign-in and registration | Confirm per template; high risk for personal data in URLs | Submit sign-in and registration forms, inspect outgoing requests and redirect URLs for email addresses or tokens |
| Account settings | Confirm per micro-frontend; may report by default | Change a profile field and check that no personal data is included in page URLs or event parameters |
| Studio (authoring) | Not part of the learner-facing analytics setup; confirm separately | Decide whether authors should be tracked at all, then disable or verify the setting in Studio separately |
Consent and privacy questions to settle before turning GA4 on
Turning on Google Analytics 4 on an Open edX site sends learner browsing data to a third party, so the tag should not go live until privacy and legal owners have answered the questions below. These are decisions for your organization's privacy and legal owners, and DeployOpen does not give legal advice.
Learner population and minors
Ask whether the learner base includes minors, employees in regulated roles, patients, or students covered by education privacy rules. Each group may need different consent treatment, and a site that mixes adult and minor learners may need separate tagging or no tagging for some courses. Record the answer per site, because a multi-site Open edX deployment may have different populations on each one. Confirm the answer with the people who own the learner records.
Lawful basis and consent model
Decide which lawful basis or consent model applies in each jurisdiction where learners sit, and whether it is opt-in or opt-out. The answer determines whether GA4 may load before a choice is made. Write the decision down so the team that configures the tag can point to it during a review.
Consent banner gating the tag
Settle whether a consent banner must block the GA4 tag until a learner agrees, and whether declining also stops the tag from reading cookies. Check that the banner covers every template where the tag appears, including the LMS templates and micro-frontends. A banner that only covers the marketing site leaves learner pages untracked or, worse, tracked without consent.
Identifiers and user properties
List every identifier and user property the tag may send, such as user IDs, email-derived values, enrollment status, or organization names. Treat anything that identifies a person or reveals a learner's role or health, religion, or union status as out of bounds unless your legal owners approve it. Ask your team to confirm which values the templates actually pass to the tag.
IP handling and retention settings
Confirm how GA4 handles IP addresses and how long event and user-level data is kept in the property before it is deleted. Compare these settings against your internal retention policy and the period your learner records are kept. Document who can change these settings in the GA4 admin console, because a later change can silently alter what is collected.
Sensitive data in URLs and parameters
Check whether sign-in details, session tokens, course identifiers tied to health or disciplinary matters, or assessment content could appear in page URLs, query strings, or page titles that GA4 records automatically. Review the LMS and micro-frontend routes that a learner visits during enrollment, login, and grading. Remove or filter any parameter that carries personal or assessment data before the tag goes live.
What to keep out of analytics events
The first decision is a boundary: nothing that identifies a learner, reveals an assessment answer, or exposes a sensitive course topic should leave the platform as a URL, page title, query string or custom event. Page URLs in Open edX carry course and block identifiers, and some routes place learner or course context in the path. Before enabling Google Analytics 4, have your course team and privacy lead agree in writing which values are safe to transmit. Course names that describe a health condition, a disciplinary process, or a graded exam are examples of content that many organizations decide to keep out of any third-party analytics stream.
Next, review what the templates actually produce. Open the LMS and micro-frontend pages you plan to measure in a browser, note the full page title, the address bar, and any query parameters added by login, enrollment, password reset, certificate or search flows. Then check the tracking code you add to the templates and any custom event calls against that list. Anything that carries an email address, username, learner ID, assessment answer or free-text search term should be removed or replaced with a generic value before the tag fires. Confirm the behavior in your own environment with a test course, since template overrides and installed plugins can change what appears.
Finally, write the permitted event list and treat it as the control document. For each event, record its name, the page or component that fires it, the parameters it sends, and the owner who approved it. Anything not on the list is not sent. Revisit the list whenever you upgrade the platform, add a theme, or install a plugin, because new templates can introduce new values. Ask your Google Analytics administrator to confirm how your property settings handle data retention and consent signals for your jurisdiction, since those obligations sit outside what the platform decides.
Questions buyers ask before configuring GA4 on Open edX
Does Open edX support Google Analytics 4?
Yes. Open edX supports Google Analytics 4 in most LMS templates and in its micro-frontends, so GA4 is a configuration task rather than a custom integration in most sites. Universal Analytics was turned off by Google for non-360 customers on 1 July 2023, so any older Universal Analytics setup needs to be replaced, not reused. Confirm the exact templates your release and theme use with the Open edX Google Analytics how-to before you plan the work, since a customized theme can change which pages report.
What does the GA4 setup effort depend on?
The effort depends mostly on how much of the LMS and micro-frontend output your organization has already customized. A site on the default templates mainly needs the measurement ID set and verification that events arrive. A site with a custom theme, comprehensive theme templates or modified micro-frontends needs each affected template checked, because a customized page can drop the tag or report under the wrong page name. Other drivers include how many sites or language variants share one property, whether you want custom events beyond page views, and how your consent banner is built.
Can our own team configure GA4 without a partner?
Often yes, if your team already runs Open edX with Tutor, can edit the theme, and has staff who can create and administer a GA4 property. The work is small when the defaults are sufficient, but the verification step is where mistakes show up: confirm that page views, sign-in and enrollment pages report, that no page sends data before consent, and that the staging and production properties are kept apart. A partner is worth considering when the theme is heavily customized, when privacy review needs documented decisions, or when the in-house team has no time for testing across templates.
What must our organization provide before configuring GA4?
Three things block the work if they are missing. First, administrator or editor access to the GA4 property and its data streams, so the measurement ID can be created and the owner is known. Second, a documented privacy decision: which pages may send data, what identifiers are allowed, how consent is captured and recorded, and who approves changes. Third, a staging environment built from the same Tutor configuration as production, so templates can be tested before they reach learners. Ask who in your organization owns each of these, because they usually sit with different teams.
How long does testing take as more templates are customized?
Testing time grows with the number of templates and micro-frontend pages that differ from the defaults, and with the number of learner journeys you need to check. Each customized page needs a check that the tag loads, that events fire once, and that no personal data appears in page URLs or event parameters. Ask any provider to list the templates it will test, the browsers and consent states it will use, and how retests after a release upgrade are handled. A fixed list makes the schedule and the quote easier to compare.
Is Matomo or Aspects a better fit than GA4 for our site?
It depends on what you need to answer. GA4 is a general web analytics service hosted by Google, which suits marketing and page-level traffic questions, but data leaves your infrastructure. Matomo is a self-hosted web analytics option covered in a separate Open edX topic and keeps web analytics data in your own environment. Aspects is the Open edX learner analytics pipeline, which captures tracking logs as xAPI statements, stores them in ClickHouse and presents them in Superset dashboards. Many organizations assess the privacy and reporting needs first, then decide whether one, two or none of these fits.
What does a DeployOpen engagement cover for GA4 on Open edX?
A DeployOpen engagement covers the work agreed in a written scope before it starts: reviewing which LMS and micro-frontend pages report, configuring the GA4 measurement in your Tutor-based environment, testing the templates you name in staging, and handing over documentation of what changed. The privacy and consent decisions remain yours, and DeployOpen does not issue audit reports or attestations. Most engagements are fixed-scope, and the quote follows from the written scope. Ongoing testing after upgrades can be arranged as a retainer if you want it.
How DeployOpen scopes and delivers GA4 on Open edX
DeployOpen treats Google Analytics 4 on Open edX as a scoped piece of platform work, not a snippet pasted into a template. We agree which LMS and micro-frontend pages report, how consent is handled, and how the setup is tested and handed over, all inside the infrastructure you control.
How we scope
- Map which LMS templates and micro-frontend pages will send events to your GA4 property
- Record the consent, cookie and data-sharing decisions your privacy team has signed off
- Confirm the GA4 measurement setup, data retention and who holds property access
- Agree the written scope, deliverables and timeline before any configuration begins
How we build
- Configure GA4 measurement in the Open edX templates and micro-frontends in scope
- Gate tracking behind the consent mode decided during scoping, not after launch
- Keep configuration in version-controlled Tutor or theme code so changes are reviewable
- Test page views and events in a staging environment before production release
How we hand over
- Deliver a page inventory showing what reports, what does not, and why
- Document the consent logic, configuration keys and rollback steps for your operators
- Walk your analytics, privacy and platform teams through the setup and open questions
- Transfer repository access and runbooks so your team can change tracking independently
How we support
- Offer ongoing support and upgrade work as a retainer after handover
- Retest tracking after Open edX upgrades, theme changes or new micro-frontend releases
- Review GA4 configuration when your privacy or consent requirements change
- Schedule continuous checks for tracking regressions as part of a retainer if you need them

