:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
from collections.abc import Callable
from django.dispatch import Signal
# Sent with `team_id=` and `experiment_id=` after a launch saves, so other products react to it
# without the experiments product importing them.
experiment_launched = Signal()
def connect_experiment_launched(receiver: Callable[..., object], *, dispatch_uid: str) -> None:
"""``receiver`` gets ``team_id=`` and ``experiment_id=`` once a launch saves. A receiver that
raises is logged and never fails the launch."""
experiment_launched.connect(receiver, dispatch_uid=dispatch_uid)