Skip to main content

GOV.UK Universal Analytics flattened tables

The UA flattened tables contain GOV.UK Universal Analytics data processed into a flat format.

Access

Everyone with a @digital.cabinet-office.gov.uk account (all GDS staff) has access to the data.

Location

This is stored in BigQuery in the dataset govuk-bigquery-analytics.FlattenedDailyData. Each daily table is sharded in the format flattened_daily_ga_data_YYYYMMDD.

For more information on our Google Cloud Platform projects, see our GCP project documentation.

Schema

field name type mode description
name STRING NULLABLE This field is deprecated
visitId INTEGER NULLABLE An identifier for the session. This is only unique to the user. For a completely unique ID, you should use a combination of fullVisitorId and visitId
visitNumber INTEGER NULLABLE The session number for this user. If this is the first session, then this is set to 1
visitorid INTEGER NULLABLE This field is deprecated. Use “fullVisitorId” instead
visitstarttime INTEGER NULLABLE The visit start time, expressed as Unix time
date STRING NULLABLE The date of the session in YYYYMMDD format
hitNumber INTEGER NULLABLE The sequenced hit number. For the first hit of each session, this is set to 1
time INTEGER NULLABLE The number of milliseconds after the visitStartTime when this hit was registered. The first hit has a time of 0
hour INTEGER NULLABLE The hour in which the hit occurred (0 to 23)
minute INTEGER NULLABLE The minute in which the hit occurred (0 to 59)
VisitStartTimestamp TIMESTAMP NULLABLE The visit start time, expressed as a timestamp (UTC)
Seconds FLOAT NULLABLE The number of seconds after the visitStartTime when this hit was registered
Hit_TimeStamp TIMESTAMP NULLABLE Time time when this hit was registered, expressed as a timestamp (UTC)
fullvisitorid STRING NULLABLE The unique visitor ID
userid STRING NULLABLE This field is deprecated and returns a null value. Use “fullVisitorId” instead
clientid STRING NULLABLE Unhashed version of the Client ID for a given user associated with any given visit/session
channelGrouping STRING NULLABLE The Default Channel Group associated with the user’s session
socialEngagementType STRING NULLABLE Engagement type, either “Socially Engaged” or “Not Socially Engaged”
visits INTEGER NULLABLE The number of sessions (for convenience). This value is 1 for sessions with interaction events. The value is null if there are no interaction events in the session
hits INTEGER NULLABLE Total number of hits within the session
timeonsite INTEGER NULLABLE Total time of the session expressed in seconds
bounces INTEGER NULLABLE Total bounces (for convenience). For a bounced session, the value is 1, otherwise it is null
transactions INTEGER NULLABLE Total number of ecommerce transactions within the session
transactionrevenue INTEGER NULLABLE This field is deprecated and returns a null value. Use “totaltransactionrevenue” instead
newVisits INTEGER NULLABLE Total number of new users in session (for convenience). If this is the first visit, this value is 1, otherwise it is null
screenviews INTEGER NULLABLE Total number of screenviews within the session (screen metrics are null for GOV.UK data, refer to page metrics instead)
uniquescreenviews INTEGER NULLABLE Total number of unique screenviews within the session (screen metrics are null for GOV.UK data, refer to page metrics instead)
timeonscreen INTEGER NULLABLE The total time on screen in seconds (screen metrics are null for GOV.UK data, refer to page metrics instead)
totaltransactionrevenue INTEGER NULLABLE Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6
sessionqualitydim INTEGER NULLABLE An estimate of how close a particular session was to transacting, ranging from 1 to 100, calculated for each session. For our data this is always 0
referralPath STRING NULLABLE If ‘medium’ is “referral”, then this returns the path of the referrer. (The host name of the referrer is in ‘source’)
campaign STRING NULLABLE The campaign value. Usually set by the utm_campaign URL parameter
source STRING NULLABLE The traffic source, i.e. the name of a search engine, the referring hostname, or a value of the utm_source URL parameter
medium STRING NULLABLE The medium of the traffic source, i.e. “organic”, “cpc”, “referral”, or the value of the utm_medium URL parameter
keyword STRING NULLABLE If this was a search results page, this is the keyword entered
adContent STRING NULLABLE The ad content of the traffic source. Can be set by the utm_content URL parameter
istruedirect BOOLEAN NULLABLE True if the source of the session was Direct, otherwise null
campaignCode STRING NULLABLE Value of the utm_id campaign tracking parameter, used for manual campaign tracking
browser STRING NULLABLE The browser used (e.g., “Chrome” or “Firefox”)
browserVersion STRING NULLABLE The version of the browser used
browserSize STRING NULLABLE The viewport size of users’ browsers. This captures the initial dimensions of the viewport in pixels
operatingSystem STRING NULLABLE The operating system of the device (e.g. “Windows”)
operatingSystemVersion STRING NULLABLE The version of the operating system
isMobile BOOLEAN NULLABLE If the user is on a mobile device, this value is true, otherwise false
mobileDeviceBranding STRING NULLABLE The brand or manufacturer of the device
mobileDeviceModel STRING NULLABLE The mobile device model
mobileInputSelector STRING NULLABLE Selector (e.g., touchscreen, joystick, clickwheel, stylus) used on the mobile device)
mobileDeviceInfo STRING NULLABLE The branding, model, and marketing name used to identify the mobile device
mobileDeviceMarketingName STRING NULLABLE The marketing name used for the mobile device
flashVersion STRING NULLABLE The version of the Adobe Flash plugin that is installed on the browser
javaEnabled BOOLEAN NULLABLE Whether or not Java is enabled in the browser
language STRING NULLABLE The language the device is set to use. Expressed as the IETF language code
screenColors STRING NULLABLE Number of colors supported by the display, expressed as the bit-depth (e.g., “8-bit”, “24-bit”, etc.)
screenResolution STRING NULLABLE The resolution of the device’s screen, expressed in pixel width x height (e.g., “800x600”)

Retention

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