Skip to main content

Understand differences between UA and GA4

Universal Analytics deprecation

Universal Analytics (UA), the previous version of Google Analytics, was sunset on 1st July 2024. GA4 is the current version of Google Analytics, and this is what we are now using for web analytics on GOV.UK. For usage data beyond 1st July 2024, this will exist in GA4 only. GA4 was set up in parallel with UA, so we began recording data in GA4 from late 2022 onwards.

The UA interface can no longer be accessed since its deprecation, so we are currently storing this historic GOV.UK UA data in Google BigQuery. This enables detailed, long-term analysis and the use of GOV.UK UA data by other tools.

When using Google Analytics 4 (GA4), it’s important to note that its data differs from UA in a number of ways. This page attempts to sum up some of the key differences that will be noticed when using GOV.UK’s analytics data.

Google Analytics data structure

The structure of GA4 data is quite different to that of UA data.

In GA4, everything is an ‘event’ - page views are no longer separated out from other events. Events also no longer have a category, action, and label, but are instead sent with a whole range of different custom dimensions.

GOV.UK’s events and custom dimensions

We have taken the opportunity that comes with the new data structure to redesign our tracking to make our data more logical and consistent. This does mean that many events and custom dimensions have changed. More information on the structure of our new GA4 data can be found here.

Dimension and metric definitions

On top of the changes that come as a result of our re-design of our analytics tracking, there are a number of changes that have been made by Google. A number of dimensions and metrics have changed - there are some new fields, some fields that existed in UA but no longer exist in GA4, and some fields that exist in both but may be defined in different ways.

The below is an incomplete list of changes.

Page views

There is a ‘views’ metric available in Looker Studio and the GA4 user interface, which covers both page views and app screen views. Whilst we are not collecting app data into the main GOV.UK GA4 property, this will be equivalent to page views. A page view is now a type of event, so you can also calculate page views by using the event count metric and filtering on the event name to only see a count of ‘page_view’ events.

In theory, page views in GA4 should be the same as total page views in UA, as the definition of a page view has not changed.

‘Unique pageviews’ no longer exists as a metric in GA4, but a similar number can be obtained by using the ‘Sessions’ metric which when combined with a page dimension will tell you the number of sessions in which that page was viewed.

More detail on how to get the number of page views of a given page can be found on the ‘How to find things in the GOV.UK GA4 data’ page.

Sessions

The definition of a session has changed in GA4. In brief, a session now only ends when there has been more than a 30-minute period of inactivity. Sessions are no longer restarted at midnight or when the user’s source/attribution information changes, as they were in UA. This will have a particular impact on some parts of GOV.UK, as users often have journeys that start on GOV.UK, then go to a service website, then come back to GOV.UK. In Universal Analytics, this journey would have counted as two sessions by the same user, whereas in GA4 (providing the user returns to GOV.UK within 30 minutes) this will count as one session.

This change has a knock-on effect on all sessionised dimensions and metrics, so you should expect differences in the numbers returned for any metrics connected to sessions. We would expect the number of sessions recorded in GA4 to be lower than in UA, and the definition change will also have a significant impact on landing pages, entrances, and the number of visits from various sources.

The way the sessions metric functions when used alongside page dimensions has also changed. Looking at ‘Sessions’ for a specific page in GA4 is similar to ‘Unique pageviews’ in UA, whereas using the ‘Sessions’ metric in UA for a specific page would give you a number identical to entrances.

Users

In many reports in the GA4 user interface, ‘Users’ is actually ‘Active users’. Active users are users with at least one ‘engaged session’. Engaged sessions are sessions that lasted 10 seconds or longer, or had 1 or more conversion events (at the moment we have no conversion events set up on GOV.UK), or 2 or more page or screen views.

‘Total users’ in GA4 is the equivalent of ‘Users’ in UA.

Acquisition information

As a change in source no longer breaks a session (see the section on sessions above), one session can have multiple sources. The standard ‘source’/‘medium’ dimensions can therefore not be used with the sessions metric, as these dimensions are event-scoped. The ‘Session source’/‘Session medium’ dimensions are session-scoped and should instead be used in conjunction with the sessions metric.

The way in which sessions are attributed to different sources has also changed for returning direct sessions in GA4. In UA, if a returning user visited the site directly, Google would default to the last known source. In GA4, there are many source fields, and so when a user visits the site directly Google defaults to the last source of the last session (not the last session source (the first source of the last session)).

Bounce and engagement

Bounce rate is calculated in very different ways in GA4 and UA, so we would expect those numbers to differ notably.

The bounce rate is now simply the inversion of the engagement rate, and so is the percentage of sessions that are not engaged sessions. The engagement rate is the percentage of sessions that are determined to be engaged sessions. Engaged sessions are sessions that either last longer than 10 seconds, contain a conversion event, or have more than one screen or page view.

In UA, a bounce represented a session that triggered only a single request to the Analytics server, such as when a user opened a single page on the site and then exited without triggering any other requests during that session. In the case of GOV.UK, a common behaviour on some pages would be to land on the page and then click an external link to go to a service. In UA, that would not be a bounce because of the interactive external link click event, whereas in GA4 that would be a bounce as the session would not be classed as ‘engaged’ (there is only one page view, the user left within 10 seconds, and the external link click has not been designated as a conversion).

The bounce and engagement rates are session-scoped, and so should be used with the landing page dimensions rather than the regular page dimensions. GA4 does not stop you from using bounce/engagement rates with ‘Page path’, ‘Page title’ and similar page dimensions, but the figures reported will not be accurate.

The ‘Engaged sessions per user’ metric is slightly misleading, as the Google documentation defines this metric as the ‘average number of engaged sessions per user’, when in fact it appears to be dividing engaged sessions by the number of active users (rather than dividing by the number of total users).

Previous page path/page referrer

In Universal Analytics you could use the ‘Previous page path’ dimension to get a sense of the user’s journey. The ‘Previous page path’ showed the user’s previous page hit.

‘Previous page path’ does not exist in GA4, but similar data could be obtained from the ‘Page referrer’ dimension. However, this is based on the document referrer, and so tells you the page the user clicked a link on to get to the present page - the page that referred the user to the current page. This is subtly different, and may sometimes diverge from the ‘Previous page path’ (see the table below).

User journey GA4 Page referrer (document.referrer) UA Previous page path
User lands on Page A (entrance)
User opens Page B in a new tab via a link on Page A Page A Page A
User opens Page C in a new tab via a link on Page A Page A Page B
User navigates to Page D via a link on Page C Page C Page C
User navigates back to Page C via back button Page A Page D

Google’s data processing

The processing of analytics data that Google carry out is different in UA and GA4. Sampling and high cardinality dimensions impact the data in different ways in UA and GA4.

Google Analytics interface

GA4 brings with it a new Google Analytics interface, featuring new tools such as explorations.

Default regex behavior

One difference that you should bear in mind when using reports or explorations in GA4, or using GA4 data in Looker Studio, is that the default regex behaviour has changed with GA4.

As detailed in Google’s documentation, in UA the default behaviour was ‘partial match’, so an expression used would be true if the pattern provided was contained anywhere in the data.

In GA4, the default behaviour is ‘full match’, so the data must exactly match the pattern provided.

Which is better or correct - UA or GA4?

Neither UA nor GA4 data is ‘correct’ - the two datasets are simply very different in terms of what data is being collected and how that data is being processed and structured. It is good to remember that Analytics data is not, and has never been, exact.

The UA and GA4 interfaces are very different and at present the GA4 interface does not enable us to do everything we were used to being able to do in UA.

It is often the case that specific information and analyses are more easily extracted from GA4 data stored in BigQuery. For the GOV.UK UA data, this is the only way the data can be accessed following the deprecation of the UA interface on 1 July 2024. Information about how to access the UA data held in BigQuery can be found here.

Alternatively, we have created a Looker Studio dashboard which replicates the reports in the Universal Analytics interface. You can find a link to this dashboard and some information on how it was created on the product page.

For additional guidance on how to analyse GA4 data using BigQuery, please refer to our documentation on how to find commonly requested information in the GA4 data.

Other resources

From GDS

From Google

This page was last reviewed on 28 November 2024. It needs to be reviewed again on 28 May 2025 .
This page was set to be reviewed before 28 May 2025. This might mean the content is out of date.