GrowthBook Cloud offers a fully managed data warehouse and event tracking pipeline. Provision it in one click, send events from your app, and GrowthBook handles the rest. No infrastructure setup required.Documentation Index
Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
See Choose Your Data Path for a side-by-side comparison with connecting your own warehouse.
What you get
When you provision the Managed Warehouse, GrowthBook automatically sets up your data source with everything pre-configured:Tables
We create 3 tables in a ClickHouse database managed by GrowthBook:| Table | What it stores | Indexed by |
|---|---|---|
| events | All custom events (page views, purchases, clicks, etc.) | event_name, timestamp |
| experiment_views | Experiment exposure events | experiment_id, timestamp |
| feature_usage | Feature flag evaluation events | feature, timestamp |
Fact Table
An Events fact table is pre-built on top of theevents table. This is the base you use to define metrics. It includes 16+ standard columns (timestamp, event name, device ID, and all your key attributes) and is ready to use immediately.
Starter metrics
Three metrics are auto-created to get you started:| Metric | Type | What it measures |
|---|---|---|
| Page Views per User | Mean | Average number of page views |
| Sessions per User | Mean | Average number of sessions |
| Pages per Session | Ratio | Page views divided by sessions |
Default key attributes
Key attributes are extracted from event data and stored as top-level columns for fast querying. We set up these defaults:- Identifier:
device_id - Dimensions:
geo_country,ua_browser,ua_os,ua_device_type,utm_source,utm_medium,utm_campaign
Getting started
1. Provision the Managed Warehouse
Go to Metrics and Data → Data Sources and click Create on the Managed Warehouse option. GrowthBook provisions your ClickHouse database, tables, fact table, and starter metrics in seconds.2. Install the SDK with tracking
Add the GrowthBook SDK to your application with the tracking plugin enabled. Here are the two most common setups: HTML Script Tag: add one line to your page:3. Verify events are flowing
Open the SQL Explorer in GrowthBook and run a quick query to confirm events are arriving:4. Create your first metric
Your auto-created metrics (Page Views per User, Sessions per User, Pages per Session) are ready to use immediately. To create a custom metric:- Go to Metrics and Data → Fact Tables.
- Open the Events fact table.
- Click Add Metric and configure it (for example, a Proportion metric filtered to
event_name = 'Purchase'to track purchase conversion rate).
5. Run your first experiment
With events flowing and metrics defined, you’re ready to experiment:- Create a feature flag in Features.
- Add an Experiment rule to it.
- Start the experiment and watch results flow in on the Results tab.
Benefits
- Fully managed: No infrastructure management, scaling, or maintenance.
- Seamless integration: One-click setup + built-in tracking in our SDKs.
- Instant data: Events are enriched and available within seconds.
- Raw SQL access: Use the SQL Explorer to run custom queries against your data.
How it works
We use ClickHouse, a database optimized for real-time analytics, to store your event data. The process is:- You send analytics events to our scalable ingestion API.
- We enrich and store them in ClickHouse within seconds.
- You can query the data with SQL, define metrics, and analyze experiment results with our stats engine.
Sending events
There are 2 ways to send events to GrowthBook Cloud’s Managed Warehouse:- With our SDKs (limited language support).
- With our Ingestion API.
With SDKs
The following SDKs have a built-in plugin to automatically send events.- HTML Script Tag
- Client-Side JavaScript / React
- Node.js
- Python
- Java
- PHP
- Golang
- Flutter
- Swift (Coming Soon)
- Kotlin (Coming Soon)
HTML Script Tag
Adddata-tracking="growthbook" to your script tag to enable.
window.gbEvents global variable. You can push events to this array, and they will be tracked.
Client-Side JavaScript / React
Use thegrowthbookTrackingPlugin to enable tracking. We recommend also using the autoAttributesPlugin to include many common attributes in your events (browser, session_id, etc.).
logEvent method to track additional custom events:
Node.js
Use thegrowthbookTrackingPlugin to enable tracking:
logEvent method to track additional custom events:
logEvent method that doesn’t require the user context:
Ingestion API
You can also send events directly to our ingestion API. Pass an array of event objects, each with the following properties:- event_name: The name of the event (e.g., “Purchase”, “Button Click”)
- properties: Optional key-value pairs with properties of the event itself
- attributes: Optional key-value pairs with attributes of the user or context at the time of the event
Experiment view events
In order to use GrowthBook’s experiment analysis features, you must send an event every time a user views an experiment. It must match the following format:- event_name: Must be
"Experiment Viewed" - properties: Must include the following key/value pairs:
experimentId: The ID of the experiment being viewedvariationId: The ID of the variation that was shown to the user
attributes with the user attributes that were used to evaluate the experiment, plus any attributes you want to use as dimensions for slicing and dicing.
Feature usage events
To take advantage of GrowthBook’s feature usage analytics, you must send an event every time a feature is evaluated with a specific format.- event_name: Must be
"Feature Evaluated" - properties: Must include the following key/value pairs:
feature: The name of the feature being evaluatedvalue: The feature’s value that was returned from the evaluationsource: (optional) The source of the feature value (e.g., “defaultValue”, “experiment”, “force”)ruleId: (optional) The ID of the specific rule that was used to evaluate the feature (or$defaultif the default value was used)variationId: (optional) If the value came from an experiment, the ID of the variation that was returned
Attributes
Attributes are key-value pairs that provide context about the user or environment at the time of the event. They can be used to slice and dice your data in analysis. It’s recommended to include the same attributes you use in your GrowthBook SDK. Some attributes are automatically enriched by the ingestion API:ip: a geoip lookup is done and the following attributes are added. If an ip attribute is not provided, we use the IP address of the request.geo_countrygeo_citygeo_latgeo_lon
ua: the user agent is parsed and the following attributes are added. If a user agent attribute is not provided, we use the user agent of the request.ua_browser(e.g. Safari)ua_os(e.g. macOS)ua_device_type(e.g. mobile)
url: the URL is parsed and the following attributes are added:url_path(e.g. /products/123)url_host(e.g. www.example.com)url_query(e.g. ?utm_source=google)url_fragment(e.g. #section1)
sdk_language(e.g. python)sdk_version(e.g. 1.2.3)
Limits
When calling the ingestion API directly, be aware of the following default limits:- Maximum of 100 events per request.
- Maximum of 1 request per second.
Key attributes (materialized columns)
By default, all attributes are stored as a JSON string in theattributes column of the events table. This keeps the table structure clean, but it can be more tedious and slow to query.
On the data source settings page, you can pick a set of “Key Attributes” that will be added as top-level columns in the table.
There are 2 main types of Key Attributes you should add:
- Identifiers: used to split traffic in experiments. Common examples are
user_id,anonymous_id, andsession_id. - Dimensions: used to slice and dice your experiment results. Common examples are
geo_country,ua_device_type, andaccount_plan.
Other as the type for any attributes that don’t fit into the above categories. This will add them as top-level columns, but they won’t be used for splitting traffic or slicing results.
Adding new Key Attributes does not apply retroactively to existing events. It only affects new events going forward. The GrowthBook team can help you backfill existing events with Key Attributes if needed.
SQL Explorer
You can use the SQL Explorer to run ad-hoc queries against your events. This is useful for exploring your data, debugging issues, or creating custom reports.The SQL Explorer only allows read-only SELECT queries. Write operations (INSERT, UPDATE, etc.) are prevented from being executed by the platform.
- feature_usage: contains all feature usage events
- experiment_views: contains all experiment view events
- events: contains all other events
SQL best practices
Use indexes
For best performance, take advantage of the indexed columns in each table:- events table:
timestamp: the time the event occurredevent_name: the name of the event (e.g., “Purchase”, “Button Click”)
- feature_usage table:
timestamp: the time the event occurredfeature: the name of the feature being evaluated
- experiment_views table:
timestamp: the time the event occurredexperimentId: the ID of the experiment being viewed
Querying attributes and properties
If you need to access data inside attributes or properties, you can use theJSONExtract functions from ClickHouse to extract values from the JSON string. Here’s an example:
Large queries
There is a limit of 1000 rows in the SQL Explorer. Returning raw events over a large time period will quickly exceed this limit. To work around this, useGROUP BY in your queries to aggregate results.
One common aggregation is by time intervals. You can use the toStartOf... functions in ClickHouse for this. For example, to get daily event counts:
toStartOfHour, toStartOfMonth, etc. that you can use to group by different time intervals.
FAQ
Can I use the Managed Warehouse alongside my own warehouse?
Yes. You can add a separate data source for your own warehouse at any time and use both simultaneously. Note that each experiment pulls data from a single data source, so you can’t mix metrics from both warehouses within one experiment.How do I add custom identifiers like user_id?
Go to your data source settings page and add user_id as a new Key Attribute with type Identifier. Once added, include user_id in the attributes of your events and it will be extracted as a top-level column.

