Universal Analytics versus Google Analytics 4 data

Learn about the differences between the Universal Analytics and Google Analytics 4 data models.

This article discusses the differences in data collection between Universal Analytics and Google Analytics 4 properties. 

In this article:

Universal Analytics concepts

Page Views / Screen Views

Page view measurement allows you to count the number of views you had for a particular page on your website. A page often corresponds to an entire HTML document, but it can also represent dynamically loaded content; this is called a virtual pageview.

A screen view is the app analog to a page view. Measuring screen views allows you to see which content is being viewed most by your users, and how they navigate between different pieces of content.  

Events

In Universal Analytics, events are user interactions measured independently from a web page or screen load. Downloads, link clicks, form submissions, and video plays are often measured as events. Events in Universal Analytics have a Category, Action, Label and sometimes a Value, and are displayed with these fields in your Analytics reports. 

Sessions

A session is a group of user interactions with your website that take place within a given time frame. For example, a single session can comprise multiple page views, events, social interactions, and ecommerce transactions. Sessions are typically defined as having ended once there has been a 30 minute period of inactivity or another qualifying reset event has occurred. 

Hit Types

Each time the Analytics tag code is triggered by a user’s behavior (for example, a user loads a page on a website or a screen in a mobile app), Analytics records that activity. Each interaction is packaged into a hit and sent to Google’s servers. Examples of hit types include page hits, event hits, ecommerce hits, and social interaction hits.

Custom Dimensions/Metrics

Custom dimensions and custom metrics are like default dimensions and metrics in your Analytics account, except you create them yourself. You can use them to analyze data that Analytics doesn't automatically collect.

Content Groupings

Content Grouping lets you group content into a logical structure, and then view and compare metrics by group name.  For example, you can see the aggregated number of pageviews for all pages in a group such as 'Men/Shirts,' and then drill in to see each URL or page title within that group.

User ID

A User ID lets you associate a non-personally identifiable persistent ID for a single user with that user's engagement data from one or more sessions initiated from one or more devices. Analytics interprets each unique user ID as a separate user, which provides a more accurate user count in your reports. When you send Analytics an ID and related data from multiple sessions, your reports tell a more unified, holistic story about a user’s relationship with your business. A User ID reporting view is necessary to view data based on the user ID's identity space. 

Client ID

The Client ID is a unique, randomly generated string that acts as a pseudoanonymous identifier and anonymously identifies a browser instance. It gets stored in the browsers cookies, so subsequent visits to the same site can be associated with the same user.

Google Analytics 4 concepts

Events

In Google Analytics 4 properties, events are user interactions with a website or app that can be measured concurrently or independently from a webpage/screen load. Examples of events include page views, button clicks, user actions, and system events.

Parameters

In Google Analytics 4 properties, you can send parameters with each event. Parameters are additional pieces of information that can further specify the action the user took, or add further context to the event. For example, parameters can be used to describe the value of purchase, or to provide context into where, how, and why the event was logged.

Some parameters, such as page_title, are sent automatically. In addition to the automatically logged parameters, you can log up to 25 parameters with each event. For a game-style event such as level_up, for example, you may want to add parameters such as level_number, character_name, etc. Or, for a content-style event such as content_view, you may want to add parameters such as article_id, article_title, author_name, author_id, and so on.

The reports in an Google Analytics 4 property provide information about the events and parameters that were sent from your app and/or website.

User Property

User properties are attributes about the users who interact with your app or website. They are used to describe segments of your user base, such as language preference or geographic location.  Analytics automatically logs some user properties

User ID

The User ID feature lets Google Analytics 4 present a cross-platform, cross-device view of how users interact with your app or website. To use this feature, you have to be able to generate your own unique, persistent IDs, consistently assign those IDs to your users, and include the IDs along with the data you send to Analytics.

Analytics creates a single user journey from all the data that is associated with the same user ID. Unlike Universal Analytics, a Google Analytics 4 property incorporates User ID natively across all reporting, analysis and insights and does not require a separate User-ID reporting view.

How Universal Analytics concepts map to Google Analytics 4

Page Views / Screen Views

Page views in Universal Analytics translate to the page_view event in Google Analytics 4 properties. A page_view event is automatically triggered by the 'config' gtag.js snippet or by the Google Analytics 4 Configuration template tag in Google Tag Manager.

Some Universal Analytics page view attributes have Google Analytics 4 equivalents, as shown below:

 

Page view attribute in Universal Analytics

Page view attribute in Google Analytics 4

page_title

page_title

page_location

page_location

page_path

page_path

None

page_referrer

 

App screen views remain unchanged from Google Analytics for Firebase.

Events

A Universal Analytics event has a Category, Action, and Label and is its own hit type. In Google Analytics 4, however, every "hit" is an event; there is no longer a distinction between hit types. Google Analytics 4 events have no notion of Category, Action, and Label and, unlike in Universal Analytics reports, Google Analytics 4 reports do not display Category, Action, and Label. Therefore, it’s better to rethink your data collection in terms of the Google Analytics 4 model rather than port your existing event structure to Google Analytics 4.

Google Analytics 4 events fall into four categories: automatically collected events, enhanced measurement events, recommended events, and custom events.

  • The following kinds of events DO NOT REQUIRE that code be added to the web page or app.
    • Automatically collected events are automatically logged (no code on page/in app) as long as you have the base code for Google Analytics 4 property implemented on your site (either via gtag.js or Google Tag Manager). Events (and associated parameters) follow predefined naming and schema.
    • Enhanced measurement events are a special set of events that are automatically logged (no code on page) to the Google Analytics 4 property and can be enabled/disabled via the Google Analytics 4 property user interface. Events and associated parameters follow predefined naming and schema.
  • The following kinds of events REQUIRE that code be added to the web page or app.
    • Recommended events have predefined names and parameters and are recommended for specific business verticals. Implementing recommended events along with their prescribed parameters provides maximum detail in your reports and enables you to benefit from the latest features and integrations as they become available. However, these events are not automatically logged; you'll need to add code to your web pages or app. Events are recommended for:
    • Custom events are events that you name and implement yourself. You should make full use of automatic, enhanced measurement, and recommended events before creating a custom event. Automatic and enhanced measurement events provide the benefits of being automatically logged. Recommended events provide forward-compatibility with future functionality. In contrast, custom events do not provide these benefits. 

Events and event parameters are subject to collection and configuration limits for Google Analytics 4. Most notably, you must register event parameters in the reporting UI in order for them to be available; otherwise, they are only available via BigQuery Export and for audience definitions.  

Mapping your Universal Analytics events to Google Analytics 4 

When mapping events from a Universal Analytics property to a Google Analytics 4 property:  

  1. First, look for a matching automatically-collected event. If you find a matching event, you should not recreate a new event. If no matching automatically-collected event exists, proceed to step 2.
  2. Look for matching enhanced measurement event. If you find a matching event, you should not recreate a new event.
  3. Look for a matching recommended event. Implement your tagging to trigger the recommended event.
  4. Finally, if you cannot find a suitable equivalent event, create your own custom event.

Aligning app and web events

Google Analytics 4 properties brings together app and web measurement; in contrast, Universal Analytics property implementations are generally web-focused. When mapping a Universal Analytics implementation to Google Analytics 4 data collection, consider your associated app measurement. If you have an app data stream in your Google Analytics 4 property and are looking for cross-platform insights, you should ensure that your event measurement is consistent across app and web. 

For example, here are a few things to watch for:

  • The same events should be named the same (e.g. avoid 'accessory_purchase' event on web vs 'access_purchase' event on app)
  • The same events should have the same associated parameters (e.g. avoid passing 'country' for 'accessory_purchase' event on web vs passing 'country_code' for 'accessory_purchase' event on app)
  • Events w/ the same associated parameters should have the parameters named the same (e.g. avoid passing 'cc' parameter for 'accessory_purchase' event on web vs passing 'country_code' parameter for 'accessory_purchase' event on app)
  • The same parameters should have comparable values passed during data collection. (e.g. avoid passing 'US' for 'country_code' parameter on web vs passing 'USA' for 'country_code' parameter on app)
  • The values passed for User ID are of the same type across app and web (e.g. avoid the string '555321' on web vs the integer 555321 on app)
Consistent implementation and naming ensures that your app and web data are comparable and that you're able to see an accurate picture of the end-user journey.

What happens if you leave your Universal Analytics events unchanged?

You should make an effort to map your Universal Analytics events to their Google Analytics 4 equivalents, as outlined above. Here are the implications of doing nothing:

  • If you use analytics.js for your Universal Analytics property: Your Universal Analytics events will not be collected in your Google Analytics 4 property. No associated events will be collected in the Google Analytics 4 property.
     
  • If you use gtag.js for your Universal Analytics property: The gtag.js events schema remains consistent* across Universal Analytics and Google Analytics 4 properties. As such, events from your Universal Analytics property will automatically map to Google Analytics 4 property events, with values and parameters mapping from one to the other. This holds true for events that follow the Action/Category/Label/Value paradigm. Note that parameters that automatically map from your Universal Analytics property to your Google Analytics 4 property may be interpreted as custom parameters (if they are not associated w/ or automatically collected events or enhanced measurement events).
    *This is true with the exception of ecommerce events, which allow "complex" (multiple key-value pairs) parameter values.
  • Google Tag Manager: New template tags are used to collect event data. No data will be collected from events implemented via Universal Analytics property template tags.

Sessions

Google Analytics 4 session metrics are derived from the session_start event. The duration of a session is based on the time span between the first and last event in the session. This and other nuances can lead to sessionization differences between your Universal Analytics and Google Analytics 4 properties. 

Session_start

session_start is one of the automatically collected Google Analytics 4 events. It is collected when a user engages the app or website after a period of inactivity that exceeds the session timeout duration.

Active user calculation

User activity is detected automatically in Google Analytics 4.  In contrast, Universal Analytics relies on manual instrumentation (firing of an interactive event). A user can launch an app and be considered an active user in Google Analytics 4 but not in Universal Analytics. This may lead to higher active user counts for Google Analytics 4.

Session counting

Some aspects of session counting differ between the two platforms. For instance, in Universal Analytics, a new campaign will start a new session regardless of activity, however, a new campaign does not begin a new session in Google Analytics 4. This may lead to lower session counts in your Google Analytics 4 reports.

Late hits may also be a factor. In Universal Analytics, hits are processed if they arrive within 4 hours of the close of the preceding day. Google Analytics 4 processes events which arrive up to 72 hours late. This may lead to lower session counts in your Universal Analytics property -- especially for apps -- and may also lead to variation in reported figures within these 72 hours.
 

App event dispatching

Logged Google Analytics 4 events are uploaded automatically when iOS apps are backgrounded. This is not the case in Universal Analytics. As a result, iOS-related metrics may be significantly higher in your Google Analytics 4 reports.

Hit Types

Google Analytics 4 property measurement is event-based, with the principle that any interaction can be captured as an event. As such, all Universal Analytics property hit types should translate to events in a Google Analytics 4 property.

 

Hit Type in Universal Analytics property

Measurement in Google Analytics 4 property

Page View

Event

Event

Event

Social

Event

Transaction/e-commerce

Event

User timing

Event

Exception

Event

App/screen view

Event

Custom dimensions and metrics

Custom dimensions and metrics in Universal Analytics are used to add information to collected data. In Google Analytics 4, events or event parameters and user properties can serve this purpose. Map your custom dimensions and metrics as follows, according to their scope. 
 

Scope in your Universal Analytics property

maps to the following in your Google Analytics 4 property

Hit-scoped

Events or event parameters

User-scoped 

User properties 

Session-scoped 

No Google Analytics 4 property equivalent

Product-scoped

E-commerce parameters 

 

Events, event parameters and user properties are subject to the limits of the Google Analytics 4 property.

Content Groupings

Content Groupings do not exist in Google Analytics 4 properties. The appropriate way to translate Content Groupings implemented via data collection in Universal Analytics is to view them as additional event parameters in the Google Analytics 4 property. This requires no additional changes to the data collection implementation. Content Groupings #1-5 are automatically translated to event-scoped custom dimensions.

Client ID

Client ID in Universal Analytics and Google Analytics 4 share the same semantics and serve the same purpose in providing a pseudonymous user identifier. The app equivalent in Google Analytics 4 property is referred to as the App Instance ID.

User ID

User ID in Universal Analytics and Google Analytics 4 serve a similar purpose in providing an identity space for users to analyze their data. From a data collection standpoint, no specific changes are necessary to map user IDs in a Universal Analytics property to a Google Analytics 4 property.

Aligning between app and web

If you need to obtain a singular view of users across app and web, make sure that the implementation of User ID on web is consistent with the implementation of User ID on app. Ensure that:

  • The same identifier is used to track users on app and web.
  • The values passed for User ID are of the same type across app and web (e.g. the string '555321' on web vs the integer 555321 on app)

Other data collection configurations

The following data collection settings migrate one-to-one from Universal Analytics to Google Analytics 4 as long as your Universal Analytics property data collection is implemented in gtag.js or Google Tag Manager. 

The following data collection settings have no equivalent in Google Analytics 4:

Comparing your data

In addition to the data model differences outlined in this article,  your tagging and configuration settings can cause variations between your Universal Analytics and Google Analytics 4 property data. When comparing your Google Analytics 4 property data to your Universal Analytics data, ensure that:

  • Your Tracking ID (from your Universal Analytics property) and Measurement ID (from your Google Analytics 4 property) are both collecting data from the same web pages
  • Both properties have equivalent tag implementations. For example, review these considerations when using connected site tags.
  • All tags are firing successfully. Google Tag Assistant can help you verify that your tags are working correctly.
  • Your Universal Analytics property and Google Analytics 4 property use the same time zones (Property settings > Reporting time zone)
  • You compare an unfiltered view in your Universal Analytics property to a single web data stream in your Google Analytics 4 property
  • Both the Universal Analytics property and the Google Analytics 4 property have been collecting data for at least 30 minutes, so that you can compare data in the Realtime reports

With all of the conditions above in place, you can compare the following data in the Realtime reports between your Universal Analytics property and Google Analytics 4 property:

UA property metric / report Google Analytics 4 property metric / report

Pageviews

Realtime > Content > Pageviews tab

Event count (for page_view event)

Realtime > Event count by Event name card

Goal completions

Realtime > Conversions

Conversions

Conversions by Event name card

(If you enabled an event as a conversion that maps to one of your goal completions, e.g., you created and enabled as a conversion an event for opening a specific page that maps to one of your destination goals.)

 

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue