BigQuery and A/B testing: Maximum precision thanks to 100% of exact data

In Google Analytics 4 (GA4) können Daten um 2–3 % schwanken. Grund dafür ist das Sampling, das bei komplexen oder umfangreichen Datenabfragen angewendet wird. Für A/B Tests, bei denen Präzision entscheidend ist, können solche Abweichungen eine Herausforderung darstellen.

BigQuery solves this problem. It allows you to analyze all data without sampling - completely and with 100 % accuracy. This allows you to perform A/B tests based on accurate data and deliver completely reliable results.

In this article you will learn what BigQuery is, what you should consider and how to set it up for your A/B testing setup.

Table of contents

What is BigQuery?

BigQuery is a powerful, serverless data warehouse from Google. It allows you to analyze huge amounts of data quickly and efficiently without having to worry about infrastructure or maintenance. It offers enormous advantages, especially in data-driven areas such as A/B testing, as it enables precise analyses in real time.

A key difference to traditional analysis tools: BigQuery processes your data completely, without sampling or extrapolation. This makes it ideal for applications where exact results are crucial, such as when evaluating conversion rates or the significance of your tests.

BigQuery is also highly scalable. No matter whether you want to analyze millions or even billions of data records. BigQuery delivers the results you need in seconds. For users already working with tools such as Google Analytics 4, BigQuery offers seamless integration options to import and process data directly from GA4.

How BigQuery takes your A/B testing to the next level

A/B testing thrives on exact data. Even small fluctuations can influence your results and obscure the true picture. BigQuery eliminates these weaknesses and gives you the opportunity to take your tests to a whole new level.

  • Exact results without sampling: While Google Analytics 4 makes extrapolations for large amounts of data, BigQuery analyzes every single data set completely. This means that your results are based on 100% accurate data.

  • Performance with large amounts of data: BigQuery was developed to handle huge data sets. Whether you are analyzing thousands of variables or billions of data points. BigQuery delivers results quickly and reliably.

  • Flexibility in the analysis: With SQL, you can create individual queries in BigQuery that are tailored precisely to your needs. This allows you to analyze your test results in more detail and in a more targeted manner than is possible with standard tools.

  • Seamless integration with GA4 and Varify.io: BigQuery can be easily connected to Google Analytics 4 and Varify.io. When used with Varify.io, you do not need to create SQL queries yourself. With Varify.io, you can display the GA4 data of your experiments directly in the tool. This saves time and reduces the complexity of your workflow.

What does BigQuery cost?

BigQuery offers you a generous entry point, as it is free to use to a certain extent. As part of the free contingent are available to you monthly 10 GB storage space and 1 TB for queries is available. This allows you to carry out many basic analyses without incurring any costs.

Google Cloud calculates the costs of its BigQuery service on the basis of two main categories:

1. storage: This incurs costs for the space that your stored data takes up.

2. queries: Here you pay for the amount of data that is processed in your queries.

The following image (as of September 1, 2024) shows an overview of how the costs for BigQuery are made up and which limits are included in the free contingent. 

Google offers a detailed Cost overview and also provides a Cost calculator which you can use to estimate possible expenses in advance.

Our tip: Set up cost control

Limit the query costs

To ensure that no unexpected costs arise or that they remain within a certain range, we recommend using the integrated cost control functions in BigQuery.

Queries in BigQuery are potentially the most costly. While each project receives 1 TB of query capacity per month free of charge, query capacity is not limited by default. Therefore, it makes sense to set up a limit for queries. To implement this, simply follow these steps:

1. check role authorizations: Make sure that you have the "Project owner" role in your BigQuery project.

2. open BigQuery project: Navigate to the project you want to limit.

3. adjust the settings:

    • Open the menu at the top left (burger menu) and select "IAM & Admin" from.
    • Click on "Quotas & System Limits".
    • Search under the service BigQuery API after the point "Query usage per day".
    • Edit this value by changing it from "unlimited" to a specific value, e.g. 0.05 TB per day (approx. 50 GB). This helps to ensure that you stay within the monthly limit of 1 TB.
 

Limit the storage costs

Storage costs are incurred if you store more than 10 GB of data per month. To reduce storage costs, you can do the following:

Limit storage period:

    • Set a Table retention policyto specify how long your tables should be saved. For example, you can have tables deleted automatically after 30 days if they are no longer needed.

Optimize event exports:

    • Limitation of the GA4 event exportsto save only relevant data for your A/B tests. Events that are not required for your evaluations can be excluded from the export.
  1.  

How to set up BigQuery

Setting up a project in BigQuery is straightforward and quick. All you need is a Google Cloud account and a little time for the configuration.

1. google cloud console

First you have to register in the Google Cloud Console log in. If you don't have an account yet, you should create one. The Cloud Console is the central point of contact for managing your projects.

Please note that Google requires credit card information when creating a new account. However, this does not incur any direct costs. These only arise when the free monthly limits are exceeded. To ensure that no costs are incurred or that they remain within a manageable limit, we recommend that you read our Tips for cost control to use.

2. create a new BigQuery project

If you do not automatically land in the Google Cloud Console after logging in or registering, you can click on "Console" in the top right-hand corner or use the following link directly: https://console.cloud.google.com/.

In the Cloud Console, click on the drop-down menu to the right of the Google Cloud logo at the top of the page. All existing Google Cloud and BigQuery projects are displayed in the window that opens.

To create a new project, select "New project". Enter a meaningful name that describes the purpose of your project and select your organization and the desired storage location.

Click on "Create" to set up your BigQuery project and make it available to you immediately.

Connect your BigQuery project with Google Analytics (GA4)

The connection between your BigQuery project and Google Analytics (GA4) allows you to seamlessly export your GA4 data to BigQuery and analyze it there in detail.

In addition to the possibility of creating queries that go far beyond the standard GA4 reports, this integration offers a decisive advantage: absolute accuracy.

Since BigQuery does not perform any extrapolations or sampling, you have access to complete and unbiased data. This is particularly important if you want to carry out precise analyses for A/B tests.

This is how you set up the connection:

  1. Go to the admin area of your GA4 property (gear icon at the bottom left)
  2. Navigate to > Property Settings > Product Links > BigQuery Links
  3. Click on the link button
  4. Select your created BigQuery project
  5. Select the storage location in BigQuery. → The tables are saved here → EU multiple regions
  6. Select the export
  7. The GA4 events can be excluded for export under "Configure data streams and events"
  8. Define export types: Event data → Daily & User data → Daily
  9. Check and save

Limit transferred events (optional)

As already mentioned above regarding cost control, you can specifically limit the events transferred to BigQuery in order to reduce costs and data volumes. Only the following are mandatory:

  • session_startto track sessions.
  • Relevant events, that you want to evaluate specifically, such as purchase or add_to_cart.

 

Link your BigQuery project with Varify.io

Linking your Varify.io account with your BigQuery project is done quickly. In Varify.io, open the Tracking settings and connect your Google account with Varify.io. As soon as the connection is established, you can select your desired BigQuery project and complete the integration.

This is how you set up the link in detail:

After you have set up your BigQuery project with activated cost control and established the connection to GA4, follow these steps to link your BigQuery project with Varify.io:

1. wait for data import:
Wait 24 hours so that the first import of GA4 events into your BigQuery project can be completed.

2. open tracking settings:
Navigate in Varify.io to AB Testing Options > Go to Tracking Setup > GA4 Report Integration.

3. select BigQuery project:
Choose from "Link BigQuery" your desired project from the list.

4. save connection:
Click on Updateto confirm the connection.

5. check the link:
A confirmation message "Dataset found" shows that the connection has been set up successfully. Please note,

Any user of a Varify.io account can activate the dataset. However, it is important that the user who establishes the Google connection has the necessary authorizations to add the project.

Add key figures to the report in Varify.io

You can add a BigQuery Goal to your reports just as easily as the GA4 Goals.

Follow these steps to set up the key figures:

After you have set up your BigQuery project with activated cost control and established the connection to GA4, follow these steps to link your BigQuery project with Varify.io:

1. open the results of the experiment:
After starting the experiment, click on the Results button.

2. add BigQuery-Goal:
Click on "Add BigQuery Goal". (This button only appears if the connection to your BigQuery project has been successfully established).

3. select event:
Select the event you want to measure, e.g. "Purchases".

4. define counting method:
In the second drop-down menu, you specify the counting method:
CountCounts how often the event has been triggered.
RevenueCounts the sales value of the event (e.g. for purchase events).

5. save settings:
Confirm your selection with the green tick.

Conclusion: Maximize your A/B testing setup with BigQuery

BigQuery enables you to make your A/B testing even more precise and efficient. Thanks to complete data sets without sampling, you can ensure that your decisions are based on completely accurate figures. The integration with GA4 ensures that you have all the relevant data available for your analyses, and Varify.io makes the process even easier.

The combination of BigQuery with Varify.io gives you powerful data processing without compromise and everything you need to maximize the success of your experiments. With these tools, you have a strong foundation to take your tests to the next level.

Wait,

It's time for Uplift

Receive our powerful CRO Insights free of charge every month.

I hereby consent to the collection and processing of the above data for the purpose of receiving the newsletter by email. I have taken note of the privacy policy and confirm this by submitting the form.