Skip to main content

Use the GOV.UK blogs GA4 data

This page is a work in progress.

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

More information about the GOV.UK blogs GA4 data source can be found on the GOV.UK blogs GA4 data source page.

Get access to GOV.UK blogs GA4 data

Blog editors should be able to grant users access to the blogs GA4 property.

If you have any issues, please contact the GOV.UK GA4 support inbox.

How to use the GOV.UK blogs GA4 data

The blogs GA4 data can be viewed in the GA4 interface, or it can be used in various reporting or data visualisation tools (such as Looker Studio).

Much of the same advice for using the GOV.UK GA4 data is relevant to using the GOV.UK blogs GA4 data, so you may wish to review the guidance on:

Find things in the GOV.UK blogs GA4 data

In Universal Analytics, we used ‘views’ to separate out the data associated with each blog site. ‘Views’ do not exist in GA4, so all of the blogs data is stored together. This means you will need to filter to the blog or blogs you are interested in to see only the data about your blogs.

Page views

There is a report in the GA4 interface which shows views by page path. In explorations and in Looker Studio, you can get numbers of page views either using a count of page_view events or using the ‘views’ metric.

A count of page_view events in GA4 should provide you with a similar number to the total pageviews figure in Universal Analytics (UA).

‘Unique pageviews’ no longer exists as a metric in GA4, but the ‘sessions’ metric is conceptually similar, telling you how many sessions contained a visit to this page. However, the definition of a session has changed in GA4, so the figures produced here will deviate significantly from those in UA.

Page views by blog (hostname)

We recommend using ‘page path’ over the ‘page location’ as the ‘page’ dimension as ‘page location’ is compatible with fewer other dimensions.

The ‘page path’ is the part of the URL after the hostname (not including any query strings) of a page.

Steps in an exploration:

  1. Create a blank exploration, and add in the ‘Page path and screen class’ and ‘Hostname’ dimensions, along with the ‘Views’ metric, using the ‘+’ buttons in the ‘Variables’ tab
  2. Add the ‘Page path and screen class’ dimension and the ‘Views’ metric to the table. You can do this by either dragging and dropping/selecting the ‘Page path’ dimension in the ‘Rows’ area in the ‘Settings’ tab, and doing the same to the ‘Views’ metric for the ‘Values’ area, or by just double-clicking on the dimension and metrics you want to use (they should automatically be assigned to be a row and a value in the table settings when you do this)
  3. Filter the data using the ‘Hostname’ dimension to select the blog(s) you are interested in. For example, if you were only interested in views of GDS blog pages, you could filter down to ‘Hostname’ contains ‘gds.blog.gov.uk’. Note that if you filtered to just ‘Hostname’ contains ‘gds’ you would get page views both of gds.blog.gov.uk pages and gdsengagement.blog.gov.uk pages
  4. Change the date range and sort the table however you like

An example exploration showing GDS blog page views can be accessed here.

Remember to check the data quality icons when using reports or explorations in GA, and to keep an eye open for the impact of our high cardinality data in Looker Studio.

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