How To Export GA4 Data To BigQuery

You can export raw event data from Google Analytics 4 to BigQuery for custom SQL analysis. The export gives you unsampled, user-level data that you own. This guide walks through linking a GA4 property, choosing between daily and streaming exports, reading the export schema, writing your first queries, and understanding the costs. You can start with the free BigQuery sandbox and scale up later.

What The BigQuery Export Gives You

The GA4 BigQuery export delivers every raw event your property collects, without the aggregation or modeling applied in the standard reports. You own the data and can manage access with BigQuery ACLs. Each linked property gets a dataset named analytics_<property_id>. Inside, you will find tables like events_YYYYMMDD for daily exports and events_intraday_YYYYMMDD for streaming exports.

Standard properties have a daily export limit of 1 million events. If you consistently exceed that, the daily export pauses until you reduce volume by filtering data streams or excluding events. Streaming export has no volume limit. For Analytics 360 properties, the daily limit rises to 20 billion events, and you also get a Fresh Daily export that delivers data by 5am with batched updates throughout the day. A completeness signal in Cloud Logging confirms when all of the previous day's data has been exported for 360 properties using daily or fresh daily export.

The export includes cookieless pings from Consent Mode, customer-provided data like user_id and custom dimensions, and the raw collected_traffic_source fields. You can later backfill Google Ads campaign data using the GCLID. Because BigQuery receives only the raw event data GA4 gets from the client, without the value additions GA4 makes in standard reports and explorations, numbers can differ from the GA4 interface. For a deeper look at what events GA4 collects, see GA4 Events Explained.

You need Editor (or higher) access on the GA4 property and an email address that has OWNER access on the BigQuery project. Start by creating a Google Cloud project and enabling the BigQuery API if you have not already done so.

  1. Go to the Google Cloud Console, create or select a project, then open the main menu in the top-left corner, click APIs & Services > Library, and enable the BigQuery API.
  2. In GA4, open Admin > Product links > BigQuery Links. (If you are unsure how to get there, the Google Analytics Admin guide shows every path.)
  3. Click Link, then Choose a BigQuery project and pick the project you prepared, then click Confirm. If you also use Firebase, selecting the same Cloud project makes joins with other Firebase data easier.
  4. Select a location for the data. If the project already has a dataset for this property, you can't configure this option. Changing the region later means deleting the link and moving the dataset, or using cross-region dataset replication.
  5. Click Next. Under Configure data streams and events, choose which data streams to export and which events to exclude. You can pick from existing events or specify event names that have not yet been collected.
  6. Optionally, check Include advertising identifiers for mobile app streams.
  7. Select Daily, Streaming, or both. For 360 properties, Fresh Daily is also available.
  8. Click Next, review your settings, and click Submit.
Click path: Admin then Product links then BigQuery Links then Link then Select export optionsAdminProduct linksBigQuery LinksLinkSelect export options
Select daily and streaming export options when linking.

After linking, verify that the built-in resource identity was granted the BigQuery User role in your Cloud project's IAM policy. Older links using the legacy service account can be upgraded from the link's details page. Linking fails if your organization policy prohibits export to the chosen region or blocks the required service accounts.

Short on time? Analytics Art can check this in your property for you.

Daily Vs Streaming Export

The export type you pick determines data freshness, completeness, and cost. You can enable daily and streaming independently.

Export typeBest when you needDetailsLimitsCaveats
Daily (Standard, 360)A complete set of data for the previous dayExports all raw, unsampled events once per day, typically mid-afternoon in the property's timezone. Last-click observed, no modeling.Standard: up to 1M events/day. 360: up to 20B events/day.User attribution data can be delayed by up to 24 hours. Use daily export for reliable traffic source dimensions.
Streaming (Standard, 360)Near-real-time data (within minutes)Continuously exports the current day's events to an events_intraday_YYYYMMDD table. Best-effort service, no completeness SLO.No volume limits.New user traffic source data (traffic_source.name, .source, .medium) is excluded. Existing user attribution takes ~24 hours to process. Adds BigQuery costs of $0.05 per GB of data.
Fresh Daily (360 only)Faster, more complete data throughout the dayData typically arrives by 5am, with batched updates throughout the day, typically within 60 minutes. Same schema as daily export.Only for Normal and Large 360 properties.SLA not available for a few XL properties.

The daily table events_YYYYMMDD is updated for up to three days after the event date to account for late-arriving data. The streaming intraday table is deleted once the daily table is complete. For more details, see the BigQuery export types documentation.

Understanding The Export Schema

Every export lands in a dataset named analytics_<property_id>. The daily table events_YYYYMMDD contains one row per event. Key columns include:

ColumnTypeDescription
event_nameSTRINGThe event name (e.g., page_view, purchase).
event_timestampINTEGERTime the event was received by GA4, in microseconds UTC.
user_pseudo_idSTRINGPseudonymous identifier assigned when a user first visits the site or opens the app.
user_idSTRINGSet if you send a logged-in identifier via User-ID.
event_paramsRECORD (repeated)Key-value pairs for event parameters. Use UNNEST to access values.
itemsRECORD (repeated)Ecommerce item details, available for events like add_to_cart or purchase.
collected_traffic_sourceRECORDManual campaign tags (UTM) and click IDs (GCLID, DCLID) collected with the event.
privacy_infoRECORDConsent status fields (ads_storage, analytics_storage) when Consent Mode is active.
Click path: BigQuery Studio then Explorer then analytics_&lt;property_id&gt; then events_ tablesBigQuery StudioExploreranalytics_&lt;property_id&gt;events_ tables
BigQuery dataset with daily and intraday tables.

Additional important fields include device.category, geo.country, and the session_traffic_source_last_click RECORD, which contains last-click attributed session data. The intraday table has the same schema except that is_active_user and user_ltv are not populated. All tables respect the property's timezone. If you change the timezone, one day's export may be shorter or longer, causing an unusual event count. The full schema reference is available in the BigQuery Export schema article.

Your First Queries

Once data appears in BigQuery, you can query it with standard SQL. Always replace the sample table name with your own and use the _TABLE_SUFFIX pseudo column to limit the date range. To get your table name, go to the BigQuery UI, find the table in the Explorer, click the three vertical dots, and choose Copy ID. Paste that name and replace the date portion with *. Here are three practical queries to get started.

Count events by date and name

SELECT event_date, event_name, COUNT(*) AS event_count
FROM `your-project.analytics_123456789.events_*`
WHERE event_name IN ('page_view', 'session_start', 'purchase')
  AND _TABLE_SUFFIX BETWEEN '20250101' AND '20250107'
GROUP BY 1, 2;

Active, new, and returning users

WITH UserInfo AS (
  SELECT user_pseudo_id,
    MAX(IF(event_name IN ('first_visit','first_open'),1,0)) AS is_new_user
  FROM `your-project.analytics_123456789.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20250101' AND '20250131'
  GROUP BY 1
)
SELECT COUNT(*) AS active_users,
  SUM(is_new_user) AS new_users,
  COUNT(*)-SUM(is_new_user) AS returning_users
FROM UserInfo;

Total purchase value

SELECT SUM(
  (SELECT COALESCE(value.int_value, value.float_value, value.double_value)
   FROM UNNEST(event_params) WHERE key = 'value')
) AS event_value
FROM `your-project.analytics_123456789.events_*`
WHERE event_name = 'purchase'
  AND _TABLE_SUFFIX BETWEEN '20250101' AND '20250131';

For more examples, including pageview sequences and joins with Google Ads, consult the BigQuery basic queries guide. When you are ready to visualize results, you can connect BigQuery directly to Looker Studio.

Costs To Watch

The GA4 BigQuery link itself is free, but BigQuery charges for storage and query processing. Two pricing components matter most:

  • Storage: You pay for the data you keep. The sandbox gives you 10 GiB of lifetime storage; exceeding this limit requires upgrading to a paid account, where standard storage rates apply.
  • Query processing: On-demand pricing costs $6.25 per TiB of data processed, with the first 1 TiB free each month. Streaming export adds $0.05 per GB of data (1 GB is roughly 600,000 GA4 events, varying by event size).

The BigQuery sandbox lets you try the export without a credit card, but it enforces strict limits: no streaming exports, tables expire after 60 days, and DML statements are blocked. To keep data longer and use streaming, you must upgrade by enabling billing on your Cloud project.

Standard GA4 properties have a 1 million event daily export limit. If you hit it, the daily export pauses. You can stay under the limit by excluding data streams or events in the link settings. Analytics 360 properties get a 20 billion event daily limit and access to Fresh Daily export. For a full comparison of 360 features, see Google Analytics 360.

You need a valid payment method on file in Cloud for the export to keep running. If billing fails, data is not re-exported for the affected period. Use the BigQuery cost controls (custom quotas, maximum bytes billed) to avoid surprises.

Frequently Asked Questions

What Is BigQuery?

BigQuery is a serverless cloud data warehouse from Google Cloud. It lets you run fast SQL queries on large datasets. When you link GA4, BigQuery stores your raw, unsampled event data so you can analyze it with full flexibility, join it with other sources, and build custom reports.

How Do I Link GA4 To BigQuery?

In GA4 Admin, go to Product links > BigQuery Links, click Link, choose a Cloud project with the BigQuery API enabled, select a data location, configure which data streams and events to export, pick Daily or Streaming export, and submit. You need Editor access on the GA4 property and OWNER access on the BigQuery project.

What Is The Difference Between Daily And Streaming Export In GA4 BigQuery?

Daily export delivers a complete batch of the previous day's events, with a 1 million event limit for standard properties. Streaming export sends events within minutes, has no volume limit, but excludes new user traffic source data and costs $0.05 per GB. You can enable both independently.

How Much Does GA4 BigQuery Export Cost?

The export itself is free. BigQuery charges for storage and query processing. On-demand queries cost $6.25 per TiB after the first 1 TiB free each month. Streaming export adds $0.05 per GB of data. The free sandbox has strict limits but lets you test without a credit card.

What Is The GA4 BigQuery Schema?

Data lands in a dataset named analytics_&lt;property_id&gt;. The main table is events_YYYYMMDD. Key columns include event_name, event_timestamp, user_pseudo_id, event_params (a repeated RECORD), items, collected_traffic_source, and privacy_info. Streaming uses an events_intraday_YYYYMMDD table with the same schema.

How Do I Query GA4 Data In BigQuery?

Use standard SQL. Replace the table name with your project.dataset.events_*, filter by _TABLE_SUFFIX for a date range, and UNNEST repeated fields like event_params or items. The basic queries guide provides ready-to-use examples for user counts, purchase values, and pageview sequences.