Skip to main content

GOV.UK GA4 access logs

The GOV.UK GA4 access logs data details usage of the GOV.UK Google Analytics GA4 data via the Google Analytics Data API. This includes usage of the GOV.UK GA4 user interface and Looker Studio connections, as well as direct querying of the API, but does not include usage of the data exported to BigQuery.

Content

Data was first collected into this dataset on the 18th July 2023.

The fields in this dataset and their descriptions can be seen in the schema table below.

Access

Access to the BigQuery dataset is limited to GA4 user admins. However, the GA4 usage report which visualises this data is shared with all GDS performance analysts and the Data Services Google group.

Summarised data is also provided to SPOCs for their department.

Location

The data is located in BigQuery under the ga4-analytics-352613.ga4_logs dataset, in the GA4 Analytics project.

This is a partitioned table, and is partitioned on the epoch_time_micros timestamp.

Set-up

Data collection

This data is generated by querying the Google Analytics Admin API. A Google Cloud Run function is triggered by a Cloud Scheduler job to run every day at 6am GMT, retrieving the data and appending it to the ga4_logs table in the dataset mentioned above.

The Cloud Run function code can be seen in the ga4-access-report repository on Github.

Schema

field name type mode description
epoch_time_micros TIMESTAMP NULLABLE The unix microseconds since the epoch that the GA user accessed GA reporting data
user_email STRING NULLABLE The user’s email address
access_mechanism STRING NULLABLE The mechanism through which a user accessed GA reporting data, for example ‘Google Analytics User Interface’ or ‘Google Analytics API’
accessor_app_name STRING NULLABLE The name of the application that accessed Google Analytics reporting data, for example ‘Looker Studio’ or ‘Power BI’
api_quota_category STRING NULLABLE The quota category for the Data API request, for example ‘Core’ or ‘Realtime’
report_type STRING NULLABLE The type of reporting data that the GA user accessed, for example ‘Realtime’ or ‘Free form exploration’
access_count INTEGER NULLABLE The number of times GA reporting data was accessed. Note that every report viewed can result in one or more data access events
api_tokens_consumed INTEGER NULLABLE The number of property quota tokens consumed for Data API requests
domain STRING NULLABLE The email domain, taken from the user’s email address

Retention

The data retention is currently set to 2 years.

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