> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Creating a no-code web experiment Canonical URL: https://posthog.com/docs/experiments/no-code-web-experiments > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.i.posthog.com` instead of `https://us.i.posthog.com` (ingestion host), and use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Limitations and use cases](#limitations-and-use-cases) - [Building a new experiment](#building-a-new-experiment) - [How to see how your experiment will look](#how-to-see-how-your-experiment-will-look) - [Troubleshooting and FAQs](#troubleshooting-and-faqs) > **Note:** No-code web experiments require `disable_web_experiments: false` in your PostHog web snippet configuration. ## Limitations and use cases No-code experiments are great because they're quick to set up and require no coding, but it's important to understand their limitations and ensure they're the right fit for your website. | Use case | Explanation | | --- | --- | | ✅ **Simple layout changes** | Small edits to text or basic formatting are easy to manage and less likely to break anything | | ✅ **Server-rendered web applications (e.g., Next.js)** | Because the page doesn't typically re-render on the client, your changes are less likely to be overwritten | | ❌ **Complex changes or interactions** | While possible, making multiple or intricate CSS and HTML modifications can introduce more risk and requires careful management | | ❌ **Single-page applications (e.g., React, Vue, Angular)** | Frameworks that frequently re-render or replace DOM elements may overwrite any no-code changes you apply | ## Building a new experiment No-code web experiments enable you to run A/B tests, multivariate tests, and other experiments that modify your website without writing a single line of code. You can build your web experiment directly in the PostHog [toolbar](https://posthog.com/docs/toolbar.md), our no-code tool. Once you save your experiment in the toolbar, it automatically appears in PostHog where you can configure metrics, launch it, and track results. In this example, we will change the text of a button on a sample webpage without writing any code. ### 1\. Configure your PostHog snippet Before creating your experiment, you'll need to add `disable_web_experiments: false` to your PostHog web snippet configuration. Otherwise, experiments configured with the toolbar won't run on your live site. Add `disable_web_experiments: false` to your PostHog init code like this: ```javascript posthog.init('', { api_host: 'https://us.i.posthog.com', defaults: '2026-08-30', disable_web_experiments: false, }) ``` ### 2\. Launch the toolbar and create your experiment Launch the toolbar on your website: 1. Go to the [toolbar tab](https://app.posthog.com/toolbar) in PostHog. 2. Add your website URL as an authorized domain if you haven't already. 3. Click **Launch** to open the toolbar on your site. The [Chrome extension](https://posthog.com/docs/toolbar/extension.md) does the same from a side panel. Open its **Experiments** tool to edit a variant and preview it on the page. Once on your site with the toolbar active: 1. Click the **Experiment** tab on the toolbar. 2. Click **New experiment** to create a new web experiment. 3. Give your experiment a name and configure your variants. 4. Select the variant of the experiment you want to modify. In our case, we select the **test** variant. 5. Click **Add element** and select the element you want to modify. For example, you can select the main signup button on your page. 6. Use the toolbar to modify the element's text, CSS, or HTML. We'll change the button's text to say "Sign up for free". Importantly, the **Text** field modifies the text of the element. The **CSS** field lets you change the styling of the element. The **HTML** field will override the entire element. **HTML content restrictions** For security reasons, certain HTML tags and patterns are not allowed in the **Text** and **HTML** fields. Using them will result in a validation error. Restricted content includes `