: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
feat(experiments): show activation event in metric form exposure banner (#93231)
Andersd4425a98f43f
diff --git a/frontend/src/scenes/experiments/ExperimentMetricForm.tsx b/frontend/src/scenes/experiments/ExperimentMetricForm.tsxindex 0a8a98cfeee5..ef0b6f2d70f0 100644--- a/frontend/src/scenes/experiments/ExperimentMetricForm.tsx+++ b/frontend/src/scenes/experiments/ExperimentMetricForm.tsx@@ -41,7 +41,7 @@ import {ExperimentRatioMetricOutlierHandling,} from './ExperimentMetricOutlierHandling'import { ExperimentMetricThreshold, isThresholdAvailableForMath } from './ExperimentMetricThreshold'-import { EXPOSURE_DEFAULT_EVENT, isDefaultExposureConfig } from './exposureContract'+import { EXPOSURE_DEFAULT_EVENT, getActivationConfig, isDefaultExposureConfig } from './exposureContract'import { filterToMetricConfig, filterToMetricSource } from './metricQueryUtils'import { createFilterForSource, getFilter } from './metricQueryUtils'import { commonActionFilterProps } from './Metrics/Selectors'@@ -281,6 +281,8 @@ export function ExperimentMetricForm({const hideDeleteBtn = (_: any, index: number): boolean => index === 0+ const activationConfig = getActivationConfig(exposureCriteria)+return (<SceneContent><SceneSection title={isSharedMetric ? 'Shared metric type' : 'Metric type'} className="max-w-prose">@@ -313,6 +315,12 @@ export function ExperimentMetricForm({<>Counts only after exposure event{' '}<LemonTag>{getExposureCriteriaLabel(exposureCriteria, resolvedExposureEvent)}</LemonTag>+ {activationConfig && (+ <>+ and activation event{' '}+ <LemonTag>{getExposureConfigDisplayName(activationConfig)}</LemonTag>+ </>+ )}</>) : (<>