Google has announced that GA4 will replace Universal Analytics in July 2023. Until then, you can use Universal Analytics or start using both. With Learnworlds, you can slowly transition to using both, something also called a "dual setup."
In this article, you can learn how you can have both Universal Analytics and GA4 on your LearnWorlds pages so that you can continue measuring the behavior of your users that you are used to while also becoming more used to a new solution.
We already have an existing integration with Google Analytics. You can measure your user’s behavior easily by inserting your Analytics ID (or GA4 ID) in the Analytics section under Settings → integrations → Analytics (replace xxxxxx with your Measurement ID).
What if you want to use both Universal Analytics and GA4?
If you want to measure user behavior in both solutions, you can do this in two ways:
1. Implement code manually on your website
The first option is to add a custom code to your website builder.
Navigate to your Site Builder → Custom Code, and paste the GA4 code, which you can find in the ‘web stream details’ section in GA4, in both head sections (logged in and logged out) in the Site Custom Code.
Save the page, and you’re ready to go! Your school’s data will now be visible in both standard analytics and Google Analytics 4.
2. Implement Universal Analytics and GA4 with Tag Manager
You can also implement Tag Manager on Learnworlds and deploy both a Universal Analytics Tag and a GA4 tag on all your pages. To implement Tag Manager, you must add your Tag Container ID in the Google Tag Manager section, under Settings → Integrations → Analytics. Click on Activate and add your GTM-ID.
In Tag Manager, you can implement Universal Analytics by following these instructions and add a second tag for GA4 by following these instructions. Make sure to trigger the event on all pages to measure your users' behavior throughout the entire website!
Here is what the events will look like in your Tag Container for both UA and GA4:
GA4 Configuration Tag
Universal Analytics Configuration Tag
Do not hesitate to contact us at email@example.com if you have any questions.