Configuring GrowthBook to work with Rudderstack
GrowthBook supports Rudderstack as an event source for easily adding A/B testing to your application. This document is a how-to guide for setting up Rudderstack with your application, connecting Rudderstack to BigQuery and then connecting GrowthBook to this data.
1. Setup Rudderstack
If you have already set up Rudderstack, you can skip this step. Rudderstack allows you to send events from your application to any data destination, including BigQuery, which is what we're going to use it for here.
Once you have a Rudderstack account, you need to create a BigQuery bucket for the event data to be stored. You can follow the directions from Rudderstack, but the short version is:
- From the Google Cloud console for BigQuery, create a new bucket (or you can also use an already existing bucket).
- Create a new service account under IAM & Admin -> Service Accounts for Rudderstack to connect to this bucket.
- Give Storage
Object Adminrole access to the newly created service account.
- Under the
actionsmenu on the service account you just created, click on manage keys to create a new key. Choose key type as JSON. This will cause a JSON key file to be downloaded to your computer.
With the bucket created, we can create a Rudderstack warehouse destination.
bucket name needs to match the values you set up when creating the Google cloud project and bucket.
Once you've created the destination, you should see it successfully connect
And it will show up as a connected destination on your Rudderstack Connect dashboard.
2. Connect GrowthBook to BiqQuery
Now that event data is flowing into BigQuery, we need to make another service account for GrowthBook to connect to BigQuery. We have a detailed guide on how to do this here: Setting up BigQuery as a data source.
3. Select Rudderstack data schema
After you successfully connect to your BigQuery database, you'll get the following modal:
Click on Rudderstack from the list. This will pre-populate the experiment exposure query which is need to determine which user saw which experiment
variation. Depending on your needs, you may still need to adjust these queries - for instance if you're tracking both
user_id, you'll need to add the
4. Add Metrics
GrowthBook needs to know what metrics you want to use in your experiments, and how to query this data from BigQuery. This step depends on your needs as an organization. Keep in mind that metric queries will be generic, returning all users who do an event, but will be joined to the experiment exposure information when determining the impact of experiment results.
Metrics are added from the Analysis -> Metrics menu.