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.

chore(web-analytics): remove heatmaps-recording-clickmap flag (#95756)

Paul D'Ambra683be8b8d194
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 4f020439b30c..5b913d17e7be 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -213,7 +213,6 @@ export const FEATURE_FLAGS = {
HEATMAPS_COHORT_FILTER: 'heatmaps-cohort-filter', // owner: #team-web-analytics
HEATMAPS_CREATION_FLOW: 'heatmaps-creation-flow', // owner: #team-web-analytics, gates the guided heatmap creation wizard at /heatmaps/new
HEATMAPS_EVENT_FILTER: 'heatmaps-event-filter', // owner: #team-web-analytics
- HEATMAPS_RECORDING_CLICKMAP: 'heatmaps-recording-clickmap', // owner: #team-web-analytics
HEATMAPS_SCREENSHOT_PREWARM: 'heatmaps-screenshot-prewarm', // owner: #team-web-analytics, pre-renders the screenshot while entering a URL in the wizard
IMPROVED_COOKIELESS_MODE: 'improved-cookieless-mode', // owner: #team-web-analytics
LINEAGE_DEPENDENCY_VIEW: 'lineage-dependency-view', // owner: #team-data-modeling
diff --git a/products/web_analytics/frontend/heatmaps/components/HeatmapRecording.tsx b/products/web_analytics/frontend/heatmaps/components/HeatmapRecording.tsx
index e315bce021fa..b9319676c33f 100644
--- a/products/web_analytics/frontend/heatmaps/components/HeatmapRecording.tsx
+++ b/products/web_analytics/frontend/heatmaps/components/HeatmapRecording.tsx
@@ -12,7 +12,6 @@ import { FilterPanel } from './FilterPanel'
import { FixedReplayHeatmapBrowser } from './FixedReplayHeatmapBrowser'
import { heatmapsBrowserLogic } from './heatmapsBrowserLogic'
import { HeatmapsWarnings } from './HeatmapsWarnings'
-import { recordingClickmapLogic } from './recordingClickmapLogic'
function UrlSearchHeader(): JSX.Element {
const logic = heatmapsBrowserLogic()
@@ -49,10 +48,8 @@ export function HeatmapRecording({ embedded = false }: { embedded?: boolean }):
const logicProps = { ref: iframeRef }
const logic = heatmapsBrowserLogic({ iframeRef })
- const clickmapLogic = recordingClickmapLogic({ iframeRef })
const { hasValidReplayIframeData } = useValues(logic)
- const { clickmapAvailable } = useValues(clickmapLogic)
if (!hasValidReplayIframeData) {
return (
@@ -71,9 +68,7 @@ export function HeatmapRecording({ embedded = false }: { embedded?: boolean }):
<div className="overflow-hidden w-full min-h-screen">
<UrlSearchHeader />
<LemonDivider className="my-4" />
- <FilterPanel
- clickmapSettings={clickmapAvailable ? <ClickmapSettings iframeRef={iframeRef} /> : undefined}
- />
+ <FilterPanel clickmapSettings={<ClickmapSettings iframeRef={iframeRef} />} />
<LemonDivider className="my-4" />
<div className="relative flex flex-1 overflow-hidden min-h-screen">
<FixedReplayHeatmapBrowser iframeRef={iframeRef} />
diff --git a/products/web_analytics/frontend/heatmaps/components/HeatmapsBrowser.tsx b/products/web_analytics/frontend/heatmaps/components/HeatmapsBrowser.tsx
index a9f2995b165f..61c9d0e0ce42 100644
--- a/products/web_analytics/frontend/heatmaps/components/HeatmapsBrowser.tsx
+++ b/products/web_analytics/frontend/heatmaps/components/HeatmapsBrowser.tsx
@@ -25,7 +25,6 @@ import { FilterPanel } from './FilterPanel'
import { FixedReplayHeatmapBrowser } from './FixedReplayHeatmapBrowser'
import { heatmapsBrowserLogic } from './heatmapsBrowserLogic'
import { IframeHeatmapBrowser } from './IframeHeatmapBrowser'
-import { recordingClickmapLogic } from './recordingClickmapLogic'
const HedgehogMagnifyingGlass = pngHoggie(magnifyingGlassPng)
@@ -355,11 +354,9 @@ export function HeatmapsBrowser(): JSX.Element {
const logicProps = { ref: iframeRef }
const logic = heatmapsBrowserLogic({ iframeRef })
- const clickmapLogic = recordingClickmapLogic({ iframeRef })
const { displayUrl, isBrowserUrlAuthorized, hasValidReplayIframeData, isBrowserUrlValid, isHeightCapped } =
useValues(logic)
- const { clickmapAvailable } = useValues(clickmapLogic)
return (
<BindLogic logic={heatmapsBrowserLogic} props={logicProps}>
@@ -370,9 +367,7 @@ export function HeatmapsBrowser(): JSX.Element {
<LemonDivider className="my-4" />
<FilterPanel
clickmapSettings={
- hasValidReplayIframeData && clickmapAvailable ? (
- <ClickmapSettings iframeRef={iframeRef} />
- ) : undefined
+ hasValidReplayIframeData ? <ClickmapSettings iframeRef={iframeRef} /> : undefined
}
/>
<LemonDivider className="my-4" />
diff --git a/products/web_analytics/frontend/heatmaps/components/recordingClickmapLogic.ts b/products/web_analytics/frontend/heatmaps/components/recordingClickmapLogic.ts
index 33eef1a904ef..f94694917185 100644
--- a/products/web_analytics/frontend/heatmaps/components/recordingClickmapLogic.ts
+++ b/products/web_analytics/frontend/heatmaps/components/recordingClickmapLogic.ts
@@ -207,7 +207,6 @@ export interface recordingClickmapLogicValues {
currentProjectId: number | null // projectLogic
currentTeam: TeamPublicType | TeamType | null // teamLogic
clickmapActive: boolean
- clickmapAvailable: boolean
clickmapBoxes: ClickmapBox[]
clickmapEnabled: boolean
elementStats: ElementStatsResponseApi | null
@@ -288,8 +287,7 @@ export interface recordingClickmapLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface recordingClickmapLogicMeta {
__keaTypeGenInternalSelectorTypes: {
- clickmapAvailable: (featureFlags: FeatureFlagsSet) => boolean
- clickmapActive: (clickmapAvailable: boolean, clickmapEnabled: boolean) => boolean
+ clickmapActive: (clickmapEnabled: boolean) => boolean
wantedDataAttributes: (currentTeam: TeamPublicType | TeamType | null) => string[]
highestClickCount: (clickmapBoxes: ClickmapBox[]) => number
totalClickCount: (clickmapBoxes: ClickmapBox[]) => number
@@ -413,15 +411,7 @@ export const recordingClickmapLogic = kea<recordingClickmapLogicType>([
],
})),
selectors({
- clickmapAvailable: [
- (s) => [s.featureFlags],
- (featureFlags: import('lib/logic/featureFlagLogic').FeatureFlagsSet): boolean =>
- !!featureFlags[FEATURE_FLAGS.HEATMAPS_RECORDING_CLICKMAP],
- ],
- clickmapActive: [
- (s) => [s.clickmapAvailable, s.clickmapEnabled],
- (clickmapAvailable: boolean, clickmapEnabled: boolean): boolean => clickmapAvailable && clickmapEnabled,
- ],
+ clickmapActive: [(s) => [s.clickmapEnabled], (clickmapEnabled: boolean): boolean => clickmapEnabled],
wantedDataAttributes: [
(s) => [s.currentTeam],
(currentTeam: null | import('~/types').TeamPublicType | import('~/types').TeamType): string[] =>
diff --git a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapRecordingScene.stories.tsx b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapRecordingScene.stories.tsx
index 9a3d64e33cce..bd49cc9ea46d 100644
--- a/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapRecordingScene.stories.tsx
+++ b/products/web_analytics/frontend/heatmaps/scenes/heatmap/HeatmapRecordingScene.stories.tsx
@@ -1,6 +1,5 @@
import { Meta, StoryObj } from '@storybook/react'
-import { FEATURE_FLAGS } from 'lib/constants'
import { App } from 'scenes/App'
import { urls } from 'scenes/urls'
@@ -94,7 +93,6 @@ const meta: Meta = {
layout: 'fullscreen',
viewMode: 'story',
pageUrl: urls.heatmapRecording(`iframeStorage=${STORAGE_KEY}`),
- featureFlags: [FEATURE_FLAGS.HEATMAPS_RECORDING_CLICKMAP],
testOptions: {
waitForSelector: '[data-attr="heatmap-clickmap-overlay"]',
waitForLoadersToDisappear: true,