Skip to main content

GOV.UK Publishing GA4

This page is a work in progress.

Google Analytics 4 (GA4) is used to collect data on the usage of GOV.UK Publishing apps.

This data can be accessed via the Google Analytics 4 user interface, the GA4 Looker Studio connection, and the Google Analytics Data API.

This data is also exported to BigQuery.

Content

The usage data for all Publishing apps is sent to the one property. Amongst others, this includes data for the Whitehall, Mainstream and Specialist Publisher apps.

Access

Contact a GOV.UK Publishing performance analyst for access to the Publishing GA4 data.

Location

There are two GOV.UK Publishing GA4 properties. These correspond to the integration and production or live GOV.UK Publishing apps.

The production property can be found in the GA4 interface here, and the integration property found here.

Data for both of these properties is exported to BigQuery, and can be found in the govuk-publishing GCP project. The production and integration GA4 data lives in different datasets, and the raw sharded tables for each can be found at govuk-publishing.analytics_400020090.events_* and govuk-publishing.analytics_414850201.events_* respectively.

In addition to these raw tables, we also apply some processing to the production GA4 data to make using it more easy and more efficient to query. Please read this page on our BigQuery processing to find out more about how users can use and understand this data.

GA4 settings

Property set-up

At set-up, we chose the following reporting options:

  • Reporting timezone of United Kingdom - (GMT+01:00) United Kingdom Time
  • Currency is British Pound (£)
  • Industry category of Law and Government
  • Business size - Very Large
  • When asked about our business objectives (which determines which standard reports GA4 will provide in the property), we chose ‘Get baseline reports’

No subproperties are set up for the GOV.UK Publishing GA4 properties. Instead, we are using BigQuery and Looker Studio to clean, filter, and control access to the data.

Data collection

GA4’s inbuilt ‘Enhanced measurement’ feature is not in use on GOV.UK Publishing apps as it was determined that it would not meet our data collection needs. However, default GA4 dimensions have been used wherever there is a clear fit to the event being captured to ensure that GDS will benefit from any default reporting functionality associated with those events and dimensions. Tracking has been implemented across GOV.UK Publishing apps using custom dataLayer pushes which are sent to GA4 with Google Tag Manager.

Google Signals data collection and Ads personalisation is disabled for GDS GA4 properties within the interface. Both of these options are also disabled in Google Tag Manager, to ensure that these settings cannot be accidentally changed.

Granular location and device data collection is enabled to allow reporting on the city-level location and devices used by our users.

Data processing and modification

At present, we have not created any custom events or designated any events as conversions within GA4.

We are also not using GA4’s inbuilt data redaction feature on GOV.UK. Instead, we are applying redaction to strip out potential Personally Identifable Information (PII) from values before they are pushed to the dataLayer (see our documentation on this in GitHub). Additional PII redaction is also applied in Google Tag Manager as a fail-safe.

Publishing GA4 data in BigQuery is available in several formats: raw sharded tables as sent by Google, flattened sharded tables, a partitioned nested table and also a partition flattened table. These tables all have various applications and advantages/disadvantages, though generally the flattened tables will be much easier to query for analysis.

Please refer to this page on our BigQuery processing, and guidance on how to use our flattened publishing data.

Retention

The data retention period for this data is set in the GA4 user interface to 38 months in the GA4 user interface.

This page was last reviewed on 16 August 2024. It needs to be reviewed again on 16 February 2025 .