Insights

4 Ways to Control Rising BigQuery Costs Associated With GA4

by Paul Cote on Oct 05, 2023

The BigQuery export feature in Google Analytics 4 that is now available to all users has seen a surge in adoption. While using this feature really shouldn't be cost prohibitive for most organizations, there are wrong ways to do things that can result in significant, unexpected costs. We've outlined four scenarios that can result in elevated BigQuery costs as well as our approach to minimizing them.

How do BigQuery costs work?

BigQuery fees are based on the amount of data you're storing and the amount of data your queries consume. Visit this page to learn more about BigQuery pricing

Solutions for rising BigQuery costs

  1. Do not connect visualization apps directly to raw datasets like the GA4 BigQuery Export
  2. Limit your queries to only reference the data you need
  3. Archive or remove old data
  4. Use the Google Analytics 4 API instead

Do not connect visualization apps directly to raw datasets like the GA4 BigQuery Export

The daily export from GA4 to BigQuery includes every event (up to 1M events for free GA) that took place on your website or app from the previous date. Highly trafficked sites have very large exports, and this can be costly and slow to query directly. Our recommendation in every case is to not try to query the raw events table, even if it is supported by your visualization app, such as Looker Studio. Each time the visualization app is used, it is running queries against an underlying table, so in an ideal world, the underlying table would only contain the data that is necessary to populate the dimension and metric requirements for the dashboard.

The better approach is to write a query that summarizes the data you need and schedule the query to run each day after the previous day's events have been transferred. The scheduled query should build or update a table with a matching schema.

Limit your queries to only reference the data you need

We see many cases where users have created scheduled queries as recommended, but are not limiting their query to only the new dates or the dates needed. These queries will grow in size (cost) over time as more and more GA4 event tables are loaded. The better approach is to use a WHERE clause to restrict the query to only use the table partitions with the dates/data needed to update the summarized table.

Archive or remove old data

While it's important to maintain a record of your historic data, there are many KPIs that have a shelf life and become less relevant and actionable with each passing day. A common example of this would be maintaining website engagement metrics (like bounce rate or time on page) for an old website that can't be viewed anymore. The better approach is to develop business rules around how much historical data is necessary for each table or report, and each day when you are updating the table with new records, you are also dropping the records that fall beyond the earliest date requirement.

Use the GA4 API instead

If your GA4 data needs are minimal or you are struggling to query the data in the GA4 BigQuery export, you should consider using the GA4 API instead. Leveraging an ETL (extract, transform, and load) application like Launchpad with a GA4 source integration adds some additional costs to your reporting toolset, but it will help you minimize your storage and query costs in Google BigQuery. The GA4 tables generated by Launchpad are much smaller and cheaper because they are specific to your needs, as opposed to getting every event that took place on the website. Launchpad also offers job scheduling, which allows you to specify a day and time that the table should be updated, as opposed to running a scheduled query that looks for a new GA4 Export table multiple times throughout the day.

Try our approach

If your BigQuery costs seem to be in excess of what you were planning for or expecting, then you're not alone. We love the Google Analytics 4 Export feature and the power it brings from an analytics perspective, but there is a right way and a wrong way to work with this data. If you're seeing significant rising costs, you're likely headed in the wrong direction. Calibrate Analytics offers both technology solutions as well as consulting and guidance services for Google Analytics 4 and Google BigQuery.

Get in touch

Share this post: