Skip to content

: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.

feat(session-replay): show event triggers on mobile replay settings tab (#64859)

Ioannis J8f6939fa6027
diff --git a/frontend/src/scenes/settings/environment/ReplayTriggers.tsx b/frontend/src/scenes/settings/environment/ReplayTriggers.tsx
index 4c0e7248736b..49b3436c0d1f 100644
--- a/frontend/src/scenes/settings/environment/ReplayTriggers.tsx
+++ b/frontend/src/scenes/settings/environment/ReplayTriggers.tsx
@@ -301,6 +301,36 @@ function MobileSampling(): JSX.Element {
)
}
+function MobileEventTriggers(): JSX.Element {
+ const { eventTriggerConfig } = useValues(replayTriggersLogic)
+
+ const eventCount = eventTriggerConfig?.length ?? 0
+
+ return (
+ <div className="flex flex-col gap-2">
+ <div className="flex flex-row items-center gap-2">
+ <LemonLabel className="text-base">
+ Event emitted{' '}
+ <Since
+ ios={{ version: '3.48.0' }}
+ android={{ version: '3.40.1' }}
+ flutter={{ version: '5.25.0' }}
+ />
+ </LemonLabel>
+ <Tooltip title="Event triggers are shared across web and mobile. Change them on the Web tab.">
+ <span className="text-muted font-semibold">
+ {eventCount > 0 ? pluralize(eventCount, 'event') : 'Not configured'}
+ </span>
+ </Tooltip>
+ </div>
+ <p className="text-muted-alt">
+ Event triggers are shared across Web, iOS, Android, and Flutter.{' '}
+ <span className="font-semibold">Change this setting on the Web tab.</span>
+ </p>
+ </div>
+ )
+}
+
function MobileMinimumDuration(): JSX.Element {
const { currentTeam } = useValues(teamLogic)
@@ -581,6 +611,7 @@ export function ReplayTriggers(): JSX.Element {
<RecordingTriggersSummary currentTeam={currentTeam} selectedPlatform={selectedPlatform} />
)}
<IngestionControls.MatchTypeSelect lockedToAllReason="Mobile only supports trigger matching of type 'all'." />
+ <MobileEventTriggers />
<LinkedFlagSelector />
<MobileSampling />
<MobileMinimumDuration />
@@ -685,6 +716,11 @@ const useTriggers = (currentTeam: TeamType | TeamPublicType, selectedPlatform: '
}
return [
+ {
+ type: TriggerType.EVENT,
+ enabled: hasEventTriggers,
+ events: eventTriggerConfig,
+ },
flagTrigger,
{
type: TriggerType.SAMPLING,