Bubble experiments installation
- 1
Copy the web snippet
RequiredFirst, copy your PostHog web snippet:
HTML - 2
Add to Bubble
RequiredGo to your Bubble site settings by clicking on the icon in the left-hand menu. If you haven't already, sign up for at least the Starter site plan. This enables you to add custom code. Then:
- Go to the SEO / metatags tab in site settings.
- Paste your PostHog snippet in the Script/meta tags in header section.
- Deploy your site to live.
- 3
Implement your experiment
RequiredExperiments run on top of our feature flags. You can define which version of your code runs based on the return value of the feature flag:
- 4
Run your experiment
RequiredOnce you've implemented the feature flag in your code, you'll enable it for a target audience by creating a new experiment in the PostHog dashboard.
- 5
Next steps
RecommendedNow that you're running experiments, continue with the resources below to learn what else Experiments enables within the PostHog platform.
Resource Description Creating an experiment How to create an experiment in PostHog Adding experiment code How to implement experiments for all platforms Statistical significance Understanding when results are meaningful Experiment insights How to analyze your experiment data More tutorials Other real-world examples and use cases