wide-cartoon-5349
09/03/2025, 5:07 PMbrash-pillow-71627
09/03/2025, 5:07 PMbrash-pillow-71627
09/03/2025, 5:08 PMsql SELECT -- Timestamp TIMESTAMP_MICROS(event_timestamp) as timestamp, -- Ids user_id, user_pseudo_id as anonymous_id, -- Event type event_name, -- Context event_value, -- e.g. the page view path geo.country, device.category as device_category FROM `events_*` WHERE -- Daily tables ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') -- Realtime streaming intraday table OR (_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
This structure allows you to filter and create metrics based on the event_name
column, which is a common pattern for GA4 data in GrowthBook. You can further customize the columns and filters based on your specific needs and the events you want to track. GrowthBook also supports auto-generating fact tables for GA4 data sources, which will include relevant columns like user IDs, timestamp, device, browser, and more, to help you get started quickly [Metric Examples and Use Cases](https://docs.growthbook.io/app/metrics/examples) [Auto fact tables and metrics for GA4/BigQuery](https://github.com/growthbook/growthbook/pull/3062).