The user fields contain information that uniquely identifies the user associated with each event.
While Google Analytics collects many of these values automatically, some of them, such as user_id and user_properties, require manual implementation. Therefore, the presence of these fields in your data may vary depending on your setup and configuration.
Field Name | Data Type | Description | Example Values |
---|---|---|---|
user_pseudo_id | STRING | The pseudonymous id for the user (sometimes referred to as client ID) | 2027626168.1665510689 |
user_id | STRING | The unique ID assigned to a user. Note: this will only be present if passed in by your site or app | An ID unique to your business |
is_active_user | BOOLEAN | Indicates whether the user was active or inactive at any point in the calendar day | true or false |
user_first_touch_timestamp | INTEGER | The time (in microseconds) at which the user first opened the app or visited the site | 1690544075596000 |
user_properties | RECORD | User property keys and values associated with the event – see User properties for more info | These will be unique to your business |
user_ltv.revenue | FLOAT | The Lifetime Value revenue of the user | 10.00 |
user_ltv.currency | STRING | The Lifetime Value currency of the user | USD, GPD, EUR, etc. |
privacy_info.analytics_storage | STRING | Indicates whether or not the user has opted-in to analytics storage Note: this is feature of Google’s consent mode and will be dependant on your implementation | Yes or No (if No then user_pseudo_id will be null) |
privacy_info.ads_storage | STRING | Indicates whether or not the user has opted-in to ads storage Note: this is feature of Google’s consent mode and will be dependant on your implementation | Yes or No |
privacy_info.uses_transient_token | STRING | Indicated if a web user has denied Analytics storage and the developer has enabled measurement without cookies based on transient tokens in server data | Yes or No |
Sample user fields query
Select the user fields you need from the below query.
For more information on how to extract specific values from the user_properties field check out the tutorial Extract GA4 user properties in BigQuery.
SELECT
user_pseudo_id,
user_id,
is_active_user,
user_first_touch_timestamp,
user_properties,
user_ltv.revenue,
user_ltv.currency,
privacy_info.analytics_storage,
privacy_info.ads_storage,
privacy_info.uses_transient_token
FROM `<project>.<dataset>.<table>`
Important Note: Make sure you replace the placeholders within the WHERE clause with the specific values for the table you are working with. For example, if you want to extract data for January 31st 2021 from the e-commerce sample dataset, use the following values:
- <project> should be replaced with bigquery-public-data
- <dataset> should be replaced with ga4_obfuscated_sample_ecommerce
- <table> should be replaced with events_20210131
Ensure that you substitute these placeholders with your actual project, dataset, and table names when executing the queries.
For details and examples of other fields & dimensions see: