Skip to content

Commit 54e941a

Browse files
devin-ai-integration[bot]tore-statsigJina YoonBrock Lumbardjina-statsig
authored
Move Warehouse Native to top navigation bar (#2896)
* Move Warehouse Native to top navigation bar Co-Authored-By: [email protected] <[email protected]> * Add dynamic search filtering based on active section Co-Authored-By: [email protected] <[email protected]> * Update search filter debug output Co-Authored-By: [email protected] <[email protected]> * Add more detailed search filter logging Co-Authored-By: [email protected] <[email protected]> * Fix search filtering to properly scope results by section Co-Authored-By: [email protected] <[email protected]> * Enhance search filtering with improved debugging and error handling Co-Authored-By: [email protected] <[email protected]> * Fix search filtering with improved initialization and error handling Co-Authored-By: [email protected] <[email protected]> * Implement new search filtering approach using DocSearch interception Co-Authored-By: [email protected] <[email protected]> * Implement DOM-based search filtering approach Co-Authored-By: [email protected] <[email protected]> * Fix search filtering by directly patching Algolia DocSearch Co-Authored-By: [email protected] <[email protected]> * Implement direct DOM manipulation for search filtering Co-Authored-By: [email protected] <[email protected]> * Implement fetch interception for Algolia search filtering Co-Authored-By: [email protected] <[email protected]> * Implement dual-approach search filtering with DOM manipulation and fetch interception Co-Authored-By: [email protected] <[email protected]> * Implement robust DOM-based search filtering with multiple observers Co-Authored-By: [email protected] <[email protected]> * Implement simplified search filtering with polling approach Co-Authored-By: [email protected] <[email protected]> * Implement direct Algolia DocSearch patching for section-based filtering Co-Authored-By: [email protected] <[email protected]> * Implement direct Algolia DocSearch integration for section-based filtering Co-Authored-By: [email protected] <[email protected]> * Implement final Algolia DocSearch integration with proper facet filters Co-Authored-By: [email protected] <[email protected]> * adding nav cards to welcome page * fixed Column import * add tutorials * add whn example redirect * homepage changes * a few WHN forked pages added, sidebar changes * Fix Algolia search facet filters for section-based filtering Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use URL filters instead of tags Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use hierarchical categories Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use advanced syntax and path-based filters Co-Authored-By: [email protected] <[email protected]> * Improve search filtering with more specific URL filters Co-Authored-By: [email protected] <[email protected]> * Enable built-in contextualSearch in Algolia configuration Co-Authored-By: [email protected] <[email protected]> * Improve search filtering with hierarchy-based filters and better section detection Co-Authored-By: [email protected] <[email protected]> * Implement direct XMLHttpRequest and fetch interception for search filtering Co-Authored-By: [email protected] <[email protected]> * Fix search filtering by using facetFilters instead of filters Co-Authored-By: [email protected] <[email protected]> * Update search filtering with improved facetFilters format Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use lvl0 hierarchy filters Co-Authored-By: [email protected] <[email protected]> * Fix syntax errors in search filtering script Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use direct DocSearch patching with proper facet filters Co-Authored-By: [email protected] <[email protected]> * Update search filtering to directly intercept Algolia fetch requests Co-Authored-By: [email protected] <[email protected]> * Enhance search filtering with XMLHttpRequest interception and improved request parsing Co-Authored-By: [email protected] <[email protected]> * Update search filtering to use path-based filters instead of tags Co-Authored-By: [email protected] <[email protected]> * created all dupe WHN pages that render same content * reorg WHN and some SDK sidebars * Improve fetch interceptor to handle Request objects Co-Authored-By: [email protected] <[email protected]> * Fix spellcheck error in owner name Co-Authored-By: [email protected] <[email protected]> * Fix spellcheck errors in owner name format Co-Authored-By: [email protected] <[email protected]> * Replace owner keywords with generic terms to fix spellcheck Co-Authored-By: [email protected] <[email protected]> * added feature gate rewrite * fixed landing page buttons and added sdk quickstart * fixed WHN forked pages frontmatter * reverted Resource Cards on landing page * added sdk cards back to homepage * condense WHN sidebar * cleanup sidebar * removed SDK quickstarts from product docs sidebar * added quickstarts * Update docs/sdks/quickstart.mdx Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * fixed links * fix link * fixed dark mode and navbar at high zoom * Update docs/getting-started.mdx Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * add jinayoon to cspell * fix name * typo * card copy * Update docs/guides/feature-gates-walkthrough.md Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * fix search * cleanup * wording tweaks * moved some tutorials to direct devs to SDKs tab * moved back tutorials * tiny fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Jina Yoon <[email protected]> Co-authored-by: Brock Lumbard <[email protected]> Co-authored-by: Jina Yoon <[email protected]> Co-authored-by: brock-statsig <[email protected]> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent c77e8bd commit 54e941a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2106
-765
lines changed

docs/experiments-plus/create-new.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ last_update:
88
date: 2025-03-04
99
---
1010

11+
12+
:::tip[Warehouse Native users]
13+
You're viewing the Cloud docs for this page. Metrics and experiments behave differently in Warehouse Native. Read about [Configuring Experiments in Warehouse Native](/statsig-warehouse-native/features/experiment-options).
14+
:::
15+
1116
This guide walks you through the steps to create and configure a new experiment in Statsig. Whether you're running a simple A/B test or a more complex multi-variant experiment, these instructions will help you set up your experiment correctly.
1217

1318
### User-level Experiments
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Differential Impact Detection
3+
sidebar_label: Differential Impact
4+
slug: /experiments-plus/differential-impact-detection-whn
5+
keywords:
6+
- owner:vm
7+
last_update:
8+
date: 2025-01-30
9+
---
10+
11+
import DifferentialImpact from '@site/docs/experiments-plus/differential-impact-detection.md';
12+
13+
<DifferentialImpact />

docs/experiments-plus/introduction.md

-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Experiments are ideal when you want to:
2222
- Run mutually exclusive experiments in parallel.
2323
- Measure the direct impact of changes on product and business metrics.
2424

25-
For a deeper understanding of using experiments in Statsig, see "[Experiments Overview](/experiments-plus)" section.
26-
2725
---
2826

2927
## Why Experiment?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Stratified Sampling
3+
sidebar_label: Stratified Sampling
4+
slug: /experiments-plus/stratified-sampling-whn
5+
keywords:
6+
- owner:vm
7+
last_update:
8+
date: 2024-10-02
9+
---
10+
11+
import StratifiedSampling from '@site/docs/experiments-plus/stratified-sampling.md';
12+
13+
<StratifiedSampling />
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Meta-Analysis
3+
sidebar_label: Meta-Analysis
4+
slug: /experimentation/meta-analysis-whn
5+
keywords:
6+
- owner:vm
7+
last_update:
8+
date: 2025-03-17
9+
---
10+
11+
import MetaAnalysis from "@site/docs/experiments/meta-analysis.md"
12+
13+
<MetaAnalysis />
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Experiment Quality Score
3+
sidebar_label: Quality Score
4+
slug: /experimentation/quality-score-whn
5+
keywords:
6+
- owner:vm
7+
last_update:
8+
date: 2025-02-14
9+
---
10+
11+
import QualityScore from '@site/docs/experiments/quality-score.mdx';
12+
13+
<QualityScore />

docs/experiments/quality-score.md renamed to docs/experiments/quality-score.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ You can enable it in Settings -> Experimentation -> Experiment Quality Score. Th
1919
## Viewing it
2020
When enabled, you can view the experiment quality score on any experiment. Applicable checks will be evaluated.
2121
![image](https://github.com/user-attachments/assets/d7483b96-8077-419d-9e23-a3e648b7e066)
22+

docs/getting-started.mdx

+64-22
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,87 @@ import SDKAndFrameworks from '../src/components/getting-started/SDKAndFrameworks
1111
import ImportantConcepts from '../src/components/getting-started/ImportantConcepts';
1212
import Styles from '../src/components/getting-started/Styles';
1313
import LandingResources from '../src/components/getting-started/Resources';
14+
import React from 'react';
15+
import Card from '@site/src/components/Card';
16+
import CardHeader from '@site/src/components/Card/CardHeader';
17+
import CardBody from '@site/src/components/Card/CardBody';
18+
import CardFooter from '@site/src/components/Card/CardFooter';
19+
import Columns from '@site/src/components/Columns';
20+
import Column from '@site/src/components/Columns/Column';
21+
import Link from '@docusaurus/Link';
1422

1523
<Styles />
1624
# Welcome to Statsig Documentation
17-
Statsig is the complete platform for product growth, empowering your team to build and innovate like the best tech companies in the world.
18-
19-
<LandingResources />
20-
You can use Statsig’s products directly with your own data warehouse through [Warehouse Native](/statsig-warehouse-native/introduction). This allows you to leverage Statsig’s features while keeping data in your existing infrastructure.
25+
Statsig empowers you to ship, measure, and learn from your releases using the same tools as the best tech companies in the world. With Statsig, you can run thousands of A/B tests, safely rollout features, and dive deep on core business metrics and user behavior—all on a single, unified platform.
26+
27+
<div className="welcome-card-container padding--lg">
28+
<Column className="padding--sm">
29+
<Card className="welcome-card" shadow="tl">
30+
<CardHeader>
31+
<img src="/img/icons/flash.svg" alt="Flash Icon" className="icon" style={{ width: '36px' }}/>
32+
<h3>SDK Quickstart</h3>
33+
<p>Install the Statsig SDK and get started in minutes.</p>
34+
</CardHeader>
35+
<CardFooter>
36+
<Link to="/sdks/quickstart">
37+
<button className="button button--secondary button--block">Get started</button>
38+
</Link>
39+
</CardFooter>
40+
</Card>
41+
</Column>
42+
43+
<Column className="padding--sm">
44+
<Card className="welcome-card" shadow="tl">
45+
<CardHeader>
46+
<img src="/img/icons/organization.svg" alt="Organization Icon" className="icon" style={{ width: '36px' }}/>
47+
<h3>Warehouse Native</h3>
48+
<p>Read about how to use Statsig with your data warehouse.</p>
49+
</CardHeader>
50+
<CardFooter>
51+
<Link to="/statsig-warehouse-native/introduction">
52+
<button className="button button--secondary button--block">Read guides</button>
53+
</Link>
54+
</CardFooter>
55+
</Card>
56+
</Column>
57+
58+
<Column className="padding--sm">
59+
<Card className="welcome-card" shadow="tl">
60+
<CardHeader>
61+
<img src="/img/icons/description.svg" alt="Description Icon" className="icon" style={{ width: '36px' }}/>
62+
<h3>Intro to Statsig</h3>
63+
<p>Learn more about core concepts and features of Statsig.</p>
64+
</CardHeader>
65+
<CardFooter>
66+
<Link to="/understanding-platform">
67+
<button className="button button--secondary button--block">Learn more</button>
68+
</Link>
69+
</CardFooter>
70+
</Card>
71+
</Column>
72+
</div>
73+
---
2174

22-
## Getting Started with Statsig
23-
Statsig supports over **30 SDKs and frameworks**, allowing you to quickly integrate with your application, whether you’re building for the web, mobile, or server environments. Follow these simple steps to get started in minutes:
24-
## Add Statsig to Your Website (JavaScript Snippet)
2575

26-
The easiest way to get up and running is by adding the Statsig JavaScript snippet to your website. This setup takes just a few seconds:
76+
## Key Features
2777

28-
Paste the following code into the `<head>` section of your website, replacing `"YOUR_CLIENT_KEY"` with your project’s **Client API Key**, which you can find in the [Statsig Console](https://console.statsig.com/api_keys).
78+
<LandingResources />
2979

30-
```html
31-
<script src="https://cdn.jsdelivr.net/npm/@statsig/js-client@3/build/statsig-js-client+session-replay+web-analytics.min.js?apikey=[YOUR_CLIENT_KEY]"></script>
32-
```
80+
You can use Statsig's products directly with your own data warehouse through [Warehouse Native](/statsig-warehouse-native/introduction). This allows you to leverage Statsig's features while keeping data in your existing infrastructure.
3381

34-
Once installed, you’ll be able to:
35-
- Start **recording events**.
36-
- Use **session replays**.
37-
- Leverage Statsig’s **experiments** and **feature flags** right away.
82+
---
3883

3984
## Explore SDKs
4085

4186
For greater control, Statsig offers SDKs for a wide variety of platforms, including JavaScript, Python, iOS, Android, and more. Select the SDK that fits your project and follow the installation guide:
4287

4388
<SDKAndFrameworks />
4489

45-
- If you dont see the SDK or framework you need, feel free to reach out directly in our [Slack Community](https://statsig.com/slack).
90+
If you don't see the SDK or framework you need, feel free to reach out directly in our [Slack Community](https://statsig.com/slack).
4691

4792
---
48-
49-
## Learn More and Get Help
50-
51-
Resources to help you make the most of Statsig:
52-
93+
# Learning Resources
94+
- **Videos**: Check out our full library of [Statsig Onboarding Training Videos](https://www.youtube.com/playlist?list=PLNJ9pKAaib3J0fYyCYRX3JhtSpwtiEL0Q) on Youtube.
5395
- **Community**: Join our [Slack Community](https://statsig.com/slack) to connect with other users and get help from the Statsig team.
5496
- **Blog**: Stay updated with the latest developments in product experimentation and feature management on our [Blog](https://statsig.com/blog).
5597

docs/guides/abn-tests.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_label: Your First A/B Test
2+
sidebar_label: Run your first Experiment
33
title: Your First A/B Test
44
keywords:
55
- owner:vm
+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
sidebar_label: Create your first Feature Gate
3+
title: Create your first Feature Gate
4+
slug: guides/feature-gates
5+
keywords:
6+
- owner:jinayoon
7+
last_update:
8+
date: 2025-04-28
9+
---
10+
11+
This tutorial walks you through how to create your first Feature Gate in Statsig from end to end. Feature Gates, also known as feature flags, are a way to safely control the rollout of new features to your users without deploying additional code. Common examples for using Feature Gates include shipping new UI elements, API endpoints, or product features.
12+
13+
By the end of this tutorial, you will have set up:
14+
* A **Feature Gate** in the Statsig console
15+
* A **targeting rule** to enable the feature for a segment of Users
16+
* A **client-side integration** using the Statsig Client SDK
17+
18+
19+
## Prerequisites
20+
1. A [Statsig account](https://console.statsig.com/sign_up)
21+
2. An existing application you can integrate the Statsig Client SDK into
22+
23+
## Part 1: Create a Feature Gate in the console
24+
For the purposes of this tutorial, we will pretend we are adding a Feature Gate to deploy a new UI element to a user with the "statsig.com" email domain. You can follow along with a specific feature if you have your own scenario in mind.
25+
26+
1. Navigate to [Feature Gates](https://console.statsig.com/gates) in the Statsig console.
27+
28+
![Feature Gates Page](https://github.com/user-attachments/assets/00331234-34b7-48ef-98a9-9a094e44af1b)
29+
30+
2. Then, click on **Get Started** if you don't have any Feature Gates set up yet, or **Create** to create a new one.
31+
32+
3. Name your gate "Example Gate". This name will also be used to identify the Feature Gate later using the SDK.
33+
34+
4. Enter a description for your Feature Gate. It's good practice to describe it in a way that other teammates can easily understand. For example: "This Feature Gate is for launching an example feature for Statsig employees only."
35+
36+
37+
## Part 2: Configure targeting rules
38+
In Statsig, when you create a Feature Gate, they are enabled by default. In other words, all users will be excluded from the feature until you add a rule that lets users "pass" the gate.
39+
40+
This means that in order to actually turn on this feature, you will need to add rules to target this Feature Gate to a specific set of folks. Let's walk through doing this in the console.
41+
42+
1. In the console, on the page for the Feature Gate you just created, click on **Add New Rule**.
43+
44+
![Adding a new rule](https://github.com/user-attachments/assets/f4717e74-c1a7-4e3e-b894-13622f230f71)
45+
46+
2. Give this rule a **Name**, such as "Statsig Users Only".
47+
48+
3. Select **Email** as our targeting criteria so we can target users based on their email address.
49+
50+
4. In the User section of the dropdown, select the **Any Of (Case Insensitive)** operator, and then add ``statsig.com`` for our email-based user targeting.
51+
52+
5. Set the **Pass Percentage** to ``100%``. Doing so ensures that all users with the ``statsig.com`` email domain will pass the Feature Gate and see the new feature.
53+
54+
6. Click **Add Rule** to add this rule to your Feature Gate.
55+
56+
7. Next, hit **Save** on the bottom right to commit these changes to the Feature Gate.
57+
58+
You can now test this feature gate by configuring the User object in the "Test Gate" section.
59+
60+
## Part 3: Create a Client API Key
61+
Now that you've set up the Feature Gate from the console, it's time to integrate it into your product with the Statsig SDK. We'll first need to create a new Client API key to use in our product.
62+
63+
1. Navigate to [**Keys & Environments**](https://console.statsig.com/api_keys) in the Statsig console. You can also find this by going to **Settings** at the bottom left of the Statsig console.
64+
65+
2. Scroll down to **API Keys**. Click on **Generate New Key**.
66+
67+
3. In the dropdown, select **Client**.
68+
69+
4. Copy the Client API Key you just created to your clipboard.
70+
71+
## Part 4: Integrate the Statsig SDK
72+
Now that we have our Client API Key, we can go ahead and integrate the Statsig Client SDK into our product. For the purposes of this tutorial, we will use the React SDK, but you can follow along with a different SDK if you prefer.
73+
74+
:::tip
75+
Statsig offers over 20 client and server-side SDKs. Check out the full list of [SDKs](/sdks/client-vs-server#available-sdks) to find the one that best fits your needs.
76+
:::
77+
78+
1. Install the Statsig React SDK using your preferred package manager. For this tutorial, we will use npm.
79+
80+
```bash
81+
npm install @statsig/react
82+
```
83+
84+
2. Import the SDK in your `App.js` file:
85+
86+
```tsx
87+
import { StatsigProvider } from "@statsig/react-bindings";
88+
```
89+
90+
3. Next, wrap your app's content within the `StatsigProvider` component. In the following code snippet, we're also creating a [User](/concepts/user) object so that we can target our Feature Gate.
91+
92+
93+
```tsx
94+
function App() {
95+
return (
96+
<StatsigProvider
97+
sdkKey="client-KEY"
98+
user={{ userID: "Example", email: "[email protected]" }}>
99+
<div>Hello world</div>
100+
</StatsigProvider>
101+
);
102+
}
103+
104+
export default App;
105+
```
106+
107+
4. Make sure to also replace `client-KEY` with the Client API Key you copied in Step 3.
108+
109+
## Part 5: Check your Feature Gate
110+
Finally, you can now evaluate a Feature Gate in your product code by getting the client with the `useStatsigClient` hook, and then calling `checkGate`.
111+
112+
1. Add the following code to your `App.js` file. In this snippet, the `example_gate` is the name of the Feature Gate you created in Step 1.
113+
114+
```tsx
115+
const { client } = useStatsigClient();
116+
return (
117+
<div>Gate is {client.checkGate('check_user') ? 'passing' : 'failing'}.</div>
118+
);
119+
```
120+
121+
2. Run your app and see the result! The app should render the text "Gate is passing" since we configured a rule in Part 1 that targets all users with the ``statsig.com`` email domain, and we are using that same email domain in this client's User object.

docs/guides/first-feature.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,4 @@ if (client.checkGate("mobile_registration")) {
194194
}
195195
```
196196

197-
## Happy Feature Gating!
197+
## Happy Feature Gating!

docs/guides/logging-events.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_label: Logging Events
2+
sidebar_label: Log your first Custom Event
33
title: Logging Events & the LogEvent API
44
keywords:
55
- owner:brock
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Metric Insights and Aggregated Impact
3+
sidebar_label: Aggregated Impact
4+
slug: /aggregated-impact-whn
5+
keywords:
6+
- owner:vm
7+
last_update:
8+
date: 2025-03-18
9+
---
10+
11+
import AggregatedImpact from '@site/docs/insights/aggregated-impact.md';
12+
13+
<AggregatedImpact />

docs/metrics/101.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ last_update:
1010

1111
# Metrics Overview
1212

13+
14+
:::tip[Warehouse Native users]
15+
You're viewing the Cloud docs for this page. Metrics and experiments behave differently in Warehouse Native. Read more in [Data & Semantic Layer in Warehouse Native](/statsig-warehouse-native/configuration/data-and-semantic-layer).
16+
:::
17+
1318
This 101-level user guide steps through the basic concepts to help you set up essential product metrics in your Statsig Project.
1419
1. [How Metrics Work on Statsig](/metrics/how-metrics-work)
1520
2. [Raw Events](/metrics/raw-events)

docs/metrics/how-metrics-work.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ last_update:
1010

1111
# How Metrics Work on Statsig
1212

13+
:::tip[Warehouse Native users]
14+
You're viewing the Cloud docs for this page. Metrics and experiments behave differently in Warehouse Native. Read more in [Data & Semantic Layer in Warehouse Native](/statsig-warehouse-native/configuration/data-and-semantic-layer).
15+
:::
16+
1317
A metric in Statsig is a numeric value for each user on a given day. This value can be aggregated across the entire user base or a subset, such as the test or control group of an experiment.
1418

1519
For example, say one user made two purchases on September 1st, and another made only one. These values can be aggregated across multiple users to calculate the total number of purchases across all users on September 1st.

0 commit comments

Comments
 (0)