Google Analytics

Google Analytics root

A Step-by-Step Guide to Migrating to Google Analytics 4 (GA4) From Universal Analytics (UA)

A Step-by-Step Guide to Migrating to Google Analytics 4 (GA4) From Universal Analytics (UA) jtomasino3

In this step-by-step guide, we will walk you through the process of setting up a GA4 property, tracking it in parallel with an existing Universal Analytics property, and configuring it to track events, measure scroll depth, and measure engagement with embedded videos.

Overview of the Process:

  1. Getting Ready:
    Make sure your website is ready for the migration process by updating your Google Analytics module/plug-in, creating a GTM account and container, and installing or enabling GTM on your website.
  2. Setting Up and Connecting a GA4 Property:
    Create a GA4 property, set up basic configuration, create a data stream, and add the GA4 tracking code to your website.
  3. Configuring a GA4 Property:
    Increase data retention time, increase user engagement time, turn on enhanced measurement, and edit Site Search and Video Engagement if necessary.
  4. Check and Verify:
    Wait 24 hours and check Google Analytics to ensure that the data is being collected properly.

Chapter 1: Background

About GA4

GA4 is the latest version of Google Analytics. It's a major update to the previous version, Universal Analytics, and provides many new features and improvements to the way data is collected and analyzed.

GA4 differs from Universal Analytics in several ways:

  1. Data Collection Model:
    GA4 uses an event-based data model, which allows you to track user interactions on your website or app more granularly than in Universal Analytics. This means that you can track specific actions that users take on your website or app, such as clicks, page views, and video plays, rather than just tracking basic metrics like sessions and pageviews.
  2. Privacy and Consent:
    GA4 was designed with user privacy in mind and offers more options for users to control their data. GA4 includes features that help website owners comply with data privacy regulations like General Data Protection Regulation and California Consumer Privacy Act .
  3. AI-powered Insights:
    GA4 comes with built-in machine learning capabilities that use artificial intelligence to provide deeper insights into user behavior and trends. This allows you to gain a better understanding of how users interact with your website or app and make more informed decisions.
  4. E-commerce Tracking:
    GA4 includes more robust e-commerce tracking capabilities, allowing you to track specific actions such as product views, add-to-cart events, and purchases. This provides more detailed insights into the performance of your online store.
  5. Cross-device Tracking:
    GA4 provides a more accurate picture of how users interact with your website or app across multiple devices. This allows you to see how users move between devices and how their behavior changes as they interact with your brand across different channels.

Why Migrating Now to GA4 is Important

On July 1, 2023, Google will replace Universal Analytics with GA4.

After this date, website data will only be collected by GA4 tracking codes and Universal Analytics will no longer collect data. Google Analytics will let you view historical Universal Analytics reports until January 2024.

What If You Do Nothing?

If you don't create a GA4 property with basic settings, Google will create a new GA4 property for you. This new GA4 property will be connected to the corresponding Universal Analytics property.

However, since GA4 functions differently than Universal Analytics, you will lose a lot of reporting information with this automatic configuration.

For the best quality setup and the most historical data and insights, we recommend that you migrate your UA property to GA4 now.

Chapter 2: Getting Ready

Here’s a list of a few important tasks to complete before beginning the migration process:

  1. Check your website for the latest Google Analytics module
    To collect the most historical data, we recommend keeping your current Universal Analytics tracking code on your website and adding the new GA4 measurement ID so that they both track website traffic in parallel until UA is discontinued. To do this, you’ll need the latest version of the Google Analytics Module.
    • For WordPress sites (CampusPress).
      • CampusPress site has been updated with the latest module. Please skip this step.
    • For Drupal websites, go to the “Extend” menu and search for the Google Analytics module.
      1. If you find it, click the arrow, then select “Configure.”
         
      2. Check to see if there is an “Add another ID” button.
        Add ID button
         
      3. If the option to add another ID is missing, or if you do not have a Google Analytics module, you can:
        1. Ask your web developer to install the latest update from Georgia Tech’s theme.
           
        2. Or proceed by replacing your Universal Analytics tag with the GA4 measurement code. Please note that you may have a gap in data until you properly configure your GA4 account settings.
           
  2. Create a GTM Account and Container.
    While GTM is not required to use GA4, using GTM makes the process of implementing and managing event tracking on your website easier and more efficient. With GTM, you can set up and configure enhanced tracking without needing a web developer. If you don’t already have a GTM account, create one at tagmanager.google.com.
     
  3. Check your website for the GTM module and enter the Container ID.
    • For WordPress (CampusPress) websites.
      1. Navigate to the dashboard in the “Statistics + GTM” menu.
      2. In the “Google Tag Manager” block, click the "Activate” button.
      3. In the “Container ID” field, paste your GTM code and click “Save Changes.”
         
    • For Drupal sites:
      1. Navigate to “Extend.”
      2. Filter for “Google Tag Manager.”
      3. If the module is already on your site but not enabled, check the box, and click “Install.”
        gtm enabled
         
      4. If it is not in your modules list, ask your web developer to install it.
         
      5. After enabling the module, click the arrow and then the “Configure” button.
        screenshot of Google Analytics module configuration
         
      6. Click the link to the “Container Management Page.”
         
      7. Paste your GTM container code in the “Container ID” field and click “Save.”
        screenshot of the container ID field

Chapter 3: Setting Up and Connecting a GA4 Property

  1. Create a GA4 Property.
    Log in to your Google Analytics account, click on the "Admin" button and select "Create Property."
    1. Set up basic configuration.
      1. Enter a property name.
      2. Select the correct time zone, currency, business information.
      3. Click the “Create” button.
    2. Create a data stream.
      1. Choose from where you will be collecting data (the web, an Android app, or an iOS app).
      2. Enter your website URL and name.
      3. Click the “Create Stream” button.
         
  2. Add the GA4 tracking code to your website.
    Under "Data Streams,” click the arrow. View and copy the “Measurement ID Code.”
    1. For WordPress websites:
      1. Navigate to the dashboard in the “Statistics + GTM” menu.
      2. In the “Analytics Configuration” block, click the cog next to Google Analytics 4.
      3. In the “Measurement ID” field, copy and paste your GA4 code.
      4. Click “Save Changes.”
    2. For Drupal websites:
      1. Navigate to Google Analytics.
        1. Click the “Extend” menu link.
        2. Filter for Google Analytics.
      2. Add the GA4 code.
        1. Click the arrow next to the module name, then click the “Configure” button.
          module configuration
           
        2. On the configuration page, click the "Add Another ID" button.
           
        3. In the new field, paste the GA4 measurement ID from 2a., beginning with "G-"
          Google Analytics fields
           
      3. Save
        Click the blue "Save Configuration" button.
         
  3. Create a new tag in GTM.
    1. Log in to your account: tagmanager.google.com.
       
    2. Click the link for the container (website) you want to manage.
      Screenshot of workspace page
       
    3. Click “Add a New Tag.”
      Screenshot of New Tag option
       
    4. Name the new tag.
      Tag name field
       
    5. Add a tag type.
      1. In the “Tag Configuration” block, click the gray icon.
        Tag configuration icon
         
      2. Select "Google Analytics: GA4 Configuration" as the tag type.
        screenshot of GA4 Configuration option
         
      3. Input the GA4 measurement ID.
        screenshot of where to input the measurement ID
         
    6. Add a Trigger.
      1. In the Triggering box, click the gray icon.
        Gray icon in the Triggering box
         
      2. Select “All Pages.”
        Screenshot of "Choose a Trigger," and the "All Pages" option.
    7. Save.
      Click the blue “Save” button in the top right corner.
       
    8. Submit and Publish.
      1. Click the blue “Submit” button.
      2. Name this version.
        In the field, describe the change you just made.
      3. Click the blue “Publish” button.
        Publish to send the changes to the live version of the website.

You are now connected to Google Analytics 4!

Chapter 5: Configuring a Google Analytics 4 Property

Out of the gate, a Google Analytics 4 property automatically tracks the following events:

  1. first_visit. This is the first time a user visits a website or launches an app.
     
  2. session_start. When a user engages with the app or website and starts a new session.
     
  3. user_engagement. This event is fired 10 seconds after the visitor has stayed on a page.

Recommended adjustments to make:

  • Increase Data Retention Time.
    Under “Data Settings,” select “Data Retention” and select “14 months” from the drop-down menu.
    screenshot of data retention settings
     
  • Turn on “Enhanced Measurement.”
    Under “Data Streams,” toggle on “Enhanced Measurements.”
    screenshot of "enhanced measurements" toggle on/off button.
     
  • Increase user engagement time.
    Under “Settings,” select “Adjust Session Timeout.” Increase “Adjust timer for engaged sessions” to 20 or 30 seconds.
     
  • Edit “Site Search” to correctly track internal search queries.
    Click “Show Advanced Settings.”
    • For Drupal sites, enter “Keys” in the Keyword Parameter Query field.
    • For WordPress, enter “s” in the Keyword Parameter Query field.
      site search settings in the Enhanced Measurement menu.
       
  • Edit “Video Engagement” if you use Vimeo on your site.
    You’ll need to edit “Video Engagement,” as it automatically measures YouTube videos, but not Vimeo.
     
  • Measure Different Scroll Depths
    To adjust the scroll depth in your GA4 account, follow these instructions: GA4 Scroll Depth.

Chapter 6: Check and Verify

Once you’ve completed all the steps above and updated your configurations, check Google Analytics in 24 hours to make sure the data is being collected properly.