From 4ae1d808d14663a610fba6d4d7b198c362badbb6 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Wed, 27 Nov 2024 13:58:21 -0800 Subject: [PATCH] Show notice when web experiments are disabled --- .../experiments/ExperimentsToolbarMenu.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx index cea73548edb91..f1a5e5ab8b878 100644 --- a/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx +++ b/frontend/src/toolbar/experiments/ExperimentsToolbarMenu.tsx @@ -1,4 +1,5 @@ import { IconPlus } from '@posthog/icons' +import { LemonBanner } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { IconOpenInNew } from 'lib/lemon-ui/icons' import { LemonButton } from 'lib/lemon-ui/LemonButton' @@ -29,6 +30,21 @@ const ExperimentsListToolbarMenu = (): JSX.Element => { return ( + {window.parent.posthog.config.disable_web_experiments && ( +
+ + Web experiments are disabled in your PostHog web snippet configuration. To run experiments, + add disable_web_experiments: false to your configuration.{' '} + + Learn more + + +
+ )}