Google Analytics is the industry-leading tool for tracking and reporting web traffic. LearnWorlds offers seamless integration with Google Analytics, allowing you to easily see how many people are visiting your website, where they are coming from, how long they are staying, how they are interacting with the site, and much more.
To comply with Google Consent Mode, users must accept the required cookies on your website, respecting their privacy preferences. These cookies, including necessary and analytics/marketing ones, are essential for tracking conversions from Google Ads campaigns while honoring user consent. LearnWorlds has made necessary adjustments to ensure compliance, prioritizing transparency and user data control.
This article will assist you in seamlessly integrating Google Analytics 4 with LearnWorlds.
Set up the Google Analytics 4 Property
1. Visit the Google Analytics Website and log in with your account.
2. Click on Settings → Admin and Create a property.
3. Enter your property name, and select the reporting time zone and currency.
4. Click on Next, choose the Industry Category, Business size, Business objectives, etc, and click on Create to create your GA4 property.
5. You need to configure the source of your data collection or data stream. First, select the type of platform you work with; for example, if you work with websites, select the Web platform option.
In the data stream creation panel that appears, insert your domain (Website URL) and assign a name to your stream (Stream name). Click on Create stream. Your data stream is now created, along with all the information needed to set up Google Analytics 4 with Learnworlds.
6. There are three possible ways to set up Google Analytics 4 with Learnworlds. You need to make sure you go only with one of them:
a. LearnWorlds native GA4 Integration (recommended)
b. LearnWorlds Custom Code Editor
c. Google Tag Manager
a. LearnWorlds native GA4 Integration (recommended)
Steps 1-5 above are required to proceed with this step.
Copy the Measurement ID that Google Analytics just generated for you (located under Admin → Property settings → Data collection and modification → Data streams) and paste it into your LearnWorlds school under Settings → Ιntegrations → Analytics. Click on Save.
b. LearnWorlds Custom Code Editor
Steps 1-5 above are required to proceed with this step.
In the data stream details panel that appears in your Google Analytics after the data stream is created, scroll down and select View tag instructions.
Select the Install manually tab and copy the Google tag.
Navigate to your LearnWorlds school, and go to Website → Design → Edit website → Site → Site custom code, and paste the Google tag in both head sections (logged in and logged out) of the Site Custom Code editor.
Your GA4 property is now set up in LearnWorlds.
c. Google Tag Manager
To follow this implementation, you need to have a GTM (Google Tag Manager) Container already created and installed on your website. Also, steps 1-5 above are required to proceed with this step.
Navigate to GTM, and create a new tag. In the creation panel, under Tag Configuration, choose the tag type Google Analytics: GA4 Configuration and insert the measurement ID found in your GA account’s data stream’s details.
Under Triggering, choose the All Pages trigger to trigger the event on all pages. This way, you will be measuring your users' behavior throughout the entire website. Your configuration will look like this: give your tag a name and click on Save.
Supported Events
In its current implementation, LearnWorlds uses the gtag.js library to help collect data in Google Analytics. The events supported out of the box by LearnWorlds’ GA integration are the following:
- Sign up / Registration
- Purchase
- Free trial on a subscription plan
- Page View
- Follow the respective Google Support article on how to set up e-commerce events with your Google Analytics 4 property.
- You can also add PayPal to the Referral Exclusion List in Google Analytics. Click here and here for more information.
- The user should have accepted the analytics cookiesin the school and not have any ad/cookie add-ons in their browser for Google Analytics to work properly.
- Once the integration is activated, it may take 24-48 hours for the data to sync.