Skip to main content

Quick Start Guide

This guide will walk you through the basics of a full integration of GrowthBook for both feature flagging and A/B testing. You can use GrowthBook for Feature Flags, Experiment Analysis, or both, and you're welcome to skip to the section that applies to your use case.


In our documentation we will use AB tests and experiment interchangeably.

Step 1. Set up GrowthBook

You can use GrowthBook hosted on our cloud, or you can choose to self-host. The easiest way is to use our cloud. You can sign up for a free account here. If you want to self-host, you can follow the instructions here or on our GitHub page.

Feature Flags

Step 2. Add an SDK endpoint

Once you're in the GrowthBook app, you need to add an SDK endpoint to allow GrowthBook to communicate to your app in order to use Feature Flags. From the left nav, click on SDK Configuration and then SDK Connections. From this page, click on the Add SDK Connection button. Name your SDK connection, then select the languages you're using in your application, and any additional options like including the visual experiments in the SDK payload. You can change any of these settings later if needed.

New SDK Connection

With this SDK endpoint created, you are now ready to install the SDK in your application. Depending on the languages you selected, you'll see instructions for how to install the SDK in your application. You can use this snippet of code for the next step.

Step 3. Integrate GrowthBook with your application

Integration with GrowthBook is done by installing one of our SDKs in your application. The SDKs are used to evaluate feature flags and run experiments. You can find specific instructions for each SDK language when you create the SDK endpoint in the app, or you can read the full documentation here.

The basics of installing the SDKs are:

  • Grab the GrowthBook SDK package for your language
  • Add the basic initialization code to your application
  • Make sure the clientKey and apiHost are correct in your SDK implementation (if you use the snippets, they will be)
  • Add any targeting attributes you want to use for feature flags and experiments

If your application has multiple languages or platforms, you can install the SDK in each of them. You can use the same SDK key, or create separate SDK keys for each platform environment. GrowthBook features and experiments will work the same across all languages, platforms, and environments.

Step 4. Add an additional event to track experiments

To analyse the results of an experiment, you'll need to track which users were exposed to which variation. GrowthBook itself does not collect raw events. Instead, GrowthBook works with most popular event trackers. This simplifies implementation as experiment exposures will be tracked alongside your existing events. You will need to just add one additional event to track when a user was exposed to an experiment.

You should see a trackingCallback method in the SDK implementation, and you will need to adjust this to call your event tracker with the experiment key and variation id. The specifics of this depend on the event tracker you're using. You can find instructions for the most popular event trackers here.

Don't have an event tracker yet?

Most companies we speak to have Google Analytics installed, which will work great. If you don't use GA, or are not testing on a website, we recommend using something like RudderStack, Jitsu, or Segment.

Step 5. Add attributes to GrowthBook

GrowthBook needs to know what attributes you want to use for targeting of features and experiments. These attributes are passed into the SDK you set up on step 2, but as evaluation happens on the SDK, and no data is passed back to the GrowthBook app, you have to describe the attributes for targeting to work correctly in our UI. You can add attributes from the SDK Configuration menu, and then Attributes. Click on the Add Attribute button, and then describe the attributes you are passing to the SDK.

Experiment Analysis

Step 6. Connect to your data warehouse

GrowthBook is warehouse native: it connects to your data warehouse and queries it to get the results of your experiments. We support all the popular SQL data warehouses such as BigQuery, Snowflake, Postgres, MySQL, Redshift, Databricks, and even Mixpanel. GrowthBook is extremely flexible and can support almost any schema structure with a bit of configuration.

Don't have a data warehouse?

Most of the popular event trackers have easy ways to export data to a data warehouse. You can read about how to set up the data source for your event tracker here.

To connect GrowthBook to your data warehouse, you need to add a data source. Click on the Metrics and Data menu from the left navigation, and then click on Data Sources. From here, click on the Add Data Source button. You'll be presented with a list of data warehouses and event trackers. The data warehouse information will actually allow us to connect to your data warehouse and execute queries with the credentials you provide. The event tracker information will allow us to generate more accurate SQL templates given the schema the event tracker uses. You can find guides on how to set up the data source for your specific data warehouse here.

Step 7. Add a metric or two

GrowthBook needs to know what metrics you want to measure for your experiments. You can add metrics in the GrowthBook UI, from the Metrics page within the Metrics and Data menu. Click on the Add Metric button, and then give your metric a name and description. You will then pick a Metric Type which will help GrowthBook understand how to analyze the metric. You can read more about metric types on the Metrics docs page.

Create your first feature flag or experiment

If you are using us for Feature Flags or as a full service Experimentation Platform:

If you are using us solely for Experimentation Analysis:

Next Steps