r. Krzysztof Surowiecki

Integration of Google Analytics 4 and BigQuery. How much does it cost? Calculator

1. BigQuery in the Google Analytics ecosystem

BigQuery is a database service provided by Google, one of its Google Cloud Platform products.

BigQuery is a serverless, scalable cloud data warehouse service. It is designed to handle large data sets along with a large number of SQL queries.

Characteristic features of BigQuery include the use of:

  • BI Engine – a built-in, powerful in-memory analysis function to handle large volumes of queries in real time
  • BigQuery ML – a machine learning function for building models using SQL
  • BigQuery Omni – enables queries from other databases within the BigQuery environment.
  • Data QnA – enables formulation of free-form text questions to data sets
  • Connected Sheets – enables building a connection between the BigQuery set and a copy of the data in Google Sheets
  • Geospatial data – enables the use of data for GEO-type services

Here is a video introducing the service:

Along with Google Analytics 4, a native integration between GA4 and BigQuery has been introduced. As a result, all data captured by Google Analytics is streamed to the BigQuery database (of course, if we complete the appropriate integration => here you can read how to do this).

At the same time, Google has restricted access to Google Analytics 4 via API. Thus, connection to Looker Studio via the GA4 connector will also be limited because of those restrictions.

This means that all Looker Studio reports should be switched to the BigQuery connector as the main report feed. Otherwise, you can expect some difficulties in working with Looker Studio reports, especially if they contain “significant” amounts of charts

For more information on the GA4 API limits, go to the following addresses:

2. BigQuery. How much does it cost? Billing rules

As part of the Google Cloud Platform, BigQuery is also a paid service.

BigQuery pricing has two main components – as illustrated in the figure below: 

BigQuery

2.1. Storage: data storage pricing

The pricing for the storage space used, varies slightly, depending on the region / zone where we want to keep our data, e.g.:

  • When selecting the Europe (eu) zone, the cost of active local storage is => $0.02 per GB
  • When selecting the Zürich (europe-west6) zone, the cost of active local storage is => $0.025 per GB
  • When selecting the Madrid (europe-southwest1) zone, the cost of active local storage is => $0.029 per GB
  • When selecting the Frankfurt (europe-west3) zone, the cost of active local storage is => $0.023 per GB

Full price list for storage space used for the Frankfurt (europe-west3) zone:

Obraz zawierający tekst

Opis wygenerowany automatycznie

The distinction between Active storage and Long-term storage is also important:

  • Active storage => Includes any table or table partition that has been modified in the last 90 days
  • Long-term storage => Includes any table or table partition that has not been modified for 90 consecutive days.

What is important – there is no difference in performance or availability between active and long-term storage.

Illustrative calculation of storage cost

So let’s try to do a BigQuery cost calculation (cost per month) for a few selected storage capacities (for the Europe – EU zone):

  • for 100 MB for half a month, you pay $0.001  
  • for 500 GB for half a month, you pay $5
  • for 1 TB for a full month, you pay $20
  • for 10 TB for a full month, you pay $200
  • for 100 TB for a full month, you pay $2000

Case study 1

Google Analytics on the website generates 15,000,000 events per month. Work out an estimate of BigQuery’s storage cost for the coming year.

An example of a storage cost calculation for a website generating 15,000,000 events per month:

Number of month Amount storage GB Price in USD 
Month 1 25.00 0.57 
Month 2 50.00 1.15 
Month 3 75.00 1.72 
Month 4 100.00 2.30 
Month 5 125.00 2.88 
Month 6 150.00 3.45 
Month 7 175.00 4.02 
Month 8 200.00 4.60 
Month 9 225.00 5.17 
Month 10 250.00 5.75 
Month 11 275.00 6.32 
Month 12 300.00 6.90 

So the full-year cost of space (storage) will be about $44.85.

Case study 2

Google Analytics on the website generates 150,000,000 events per month. Work out an estimate of BigQuery’s storage cost for the coming year.

An example calculation for a website generating 150,000,000 events per month:

Number of month Amount storage GB Price in USD 
Month 1 250.00 5.75 
Month 2 500.00 11.50 
Month 3 750.00 17.25 
Month 4 1000.00 23.00 
Month 5 1250.00 28.75 
Month 6 1500.00 34.50 
Month 7 1750.00 40.25 
Month 8 2000.00 46.00 
Month 9 2250.00 51.75 
Month 10 2500.00 57.50 
Month 11 2750.00 63.25 
Month 12 3000.00 69.00 

So the full-year cost for storage will be USD 448.5.


Capacity (storage) cost calculator

Enter the monthly number of requests in Google Analytics:

Where can I find the monthly number of requests?

  • Universal Analytics: Admin => Property Settings
  • Google Analytics 4: Reports => Engagement => Events 

2.2. Analysis Pricing: price for running queries/operations to the database

Price for analytical queries run => what does it mean?

Analysis pricing is the cost to process queries, including SQL queries, user-defined functions, scripts, and certain data manipulation language (DML) and data definition language (DDL) statements that scan tables.

So it’s a cost that is in direct proportion to our analytic activities – the more we query a dataset, the higher this cost will be.

Google Cloud Platform offers a choice of two alternative pricing approaches:

  • Model 1 => On-demand pricing (variable cost, calculated per query)
  • Model 2 = > Flat-rate pricing (fixed cost, i.e. a flat rate – price for reserving a resource)

2.2.1. On-demand pricing => Price for queries run

With this pricing model, you are charged for the number of bytes processed by each query. The first 1 TB of query data processed per month is free.

The rate may vary depending on the region / zone.

  • The cost of 1 TB is $5 for the Europe EU region
  • The cost of 1 TB is $6.50 for the Frankfurt (europe-west3) region
  • The cost of 1 TB is $7 for the Zürich (europe-west6) region

It is important to emphasize that this cost is paid for data queries. So, if you don’t do any work (queries) with the data, there is no cost. What’s more – before each database query – you can check the cost of such a query, and then cancel (modify) it if you see that the cost is too high.

Excerpt from Google BigQuery documentation for the Frankfurt (europe-west3) region:

An illustrative cost calculation according to the calculator found on Google’s website:

Calculation for the Frankfurt (europe-west3) region:

If we run queries that download a total of 2 TB of data, our cost per month will be:

  • $6,50 per month (we effectively pay for 1 TB, because the first 1 TB is free)

If we run queries that download a total of 10 TB of data, our cost per month will be:

  • $58,50 per month (we effectively pay for 9 TB, because the first 1 TB is free)

2.2.2. Flat-rate pricing => Price for reservation of fixed processing capacity

With this pricing model, you purchase Slots.

What is a slot?

Slot is a term used in the context of the BigQuery service.

This is the unit of processing capacity that is used by BigQuery to execute queries. Slots are allocated to queries based on their complexity and processing capacity requirements. The more slots are allocated to a query, the faster it is executed.

The minimum commitment is 100 slots or a multiple of that number (200, 300, …, 1000 etc.). There is no limit to the number of commitments you can have.

Slots can be purchased as the following plans (commitments):

A. Flat-rate pricing. Flex plan=> this is a short-term commitment for up to 60 seconds

Flex plan pricing example for Frankfurt (europe-west3):

=> $5.2 per hour of operation, 100 slots available

Obraz zawierający tekst

Opis wygenerowany automatycznie

B. Monthly flat-rate commitment => this is a monthly commitment

With a monthly commitment, you pay for a certain number of slots for one month and then per second until you remove the commitment or convert it to an annual commitment plan.

The price list for a monthly commitment, in the Frankfurt (europe-west3) zone, is:

The important thing is:

You cannot delete (cancel) a monthly commitment plan before 30 days after the plan (commitment) becomes active.

However, after 30 days, we get the option to delete it at any time, and we will only be charged for the seconds during which our commitment was active.

If we do not close (delete) the plan, it will continue in the per-second billing model (plan – commitment – Flex, described above).

C. Annual flat-rate commitment => this is an annual commitment (365 days)

With the annual commitment, we pay for a certain number of slots for one year. 

Monthly price list, based on the annual plan, for the Frankfurt (europe-west3) location:

After one year, the annual commitment is converted to a Monthly flat-rate commitment by default, although we can define a different type of conversion, e.g. continue with an annual plan or convert it to the Flex commitment.

Does it pay to use long-term commitments?

With monthly and annual plans, you get a lower price in exchange for a long-term performance commitment. This can be seen, for example, when comparing the cost per month in the monthly commitment and the annual commitment.