diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 60e6358245b81..07e94d39f5875 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -235,6 +235,7 @@ export const FEATURE_FLAGS = { SITE_APP_FUNCTIONS: 'site-app-functions', // owner: @mariusandra #team-cdp REPLAY_HOGQL_FILTERS: 'replay-hogql-filters', // owner: @pauldambra #team-replay REPLAY_LIST_RECORDINGS_AS_QUERY: 'replay-list-recordings-as-query', // owner: @pauldambra #team-replay + WEB_ANALYTICS_CONVERSION_GOAL_FILTERS: 'web-analytics-conversion-goal-filters', // owner: @rafaeelaudibert #team-web-analytics } as const export type FeatureFlagKey = (typeof FEATURE_FLAGS)[keyof typeof FEATURE_FLAGS] diff --git a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx index 2fb0f22d66a74..08942fee2f09b 100644 --- a/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx +++ b/frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx @@ -609,7 +609,9 @@ export const webAnalyticsLogic = kea([ compare, }, filterTestAccounts, - conversionGoal, + conversionGoal: featureFlags[FEATURE_FLAGS.WEB_ANALYTICS_CONVERSION_GOAL_FILTERS] + ? conversionGoal + : undefined, properties: webAnalyticsFilters, }, hidePersonsModal: true, @@ -649,7 +651,9 @@ export const webAnalyticsLogic = kea([ sampling, limit: 10, filterTestAccounts, - conversionGoal, + conversionGoal: featureFlags[FEATURE_FLAGS.WEB_ANALYTICS_CONVERSION_GOAL_FILTERS] + ? conversionGoal + : undefined, ...(source || {}), }, embedded: false, @@ -850,7 +854,11 @@ export const webAnalyticsLogic = kea([ sampling, limit: 10, filterTestAccounts, - conversionGoal, + conversionGoal: featureFlags[ + FEATURE_FLAGS.WEB_ANALYTICS_CONVERSION_GOAL_FILTERS + ] + ? conversionGoal + : undefined, stripQueryParams: shouldStripQueryParams, }, embedded: false, @@ -1125,7 +1133,11 @@ export const webAnalyticsLogic = kea([ trendsFilter: { display: ChartDisplayType.WorldMap, }, - conversionGoal, + conversionGoal: featureFlags[ + FEATURE_FLAGS.WEB_ANALYTICS_CONVERSION_GOAL_FILTERS + ] + ? conversionGoal + : undefined, filterTestAccounts, properties: webAnalyticsFilters, }, @@ -1426,15 +1438,16 @@ export const webAnalyticsLogic = kea([ }, ], replayFilters: [ - (s) => [s.webAnalyticsFilters, s.dateFilter, s.shouldFilterTestAccounts, s.conversionGoal], + (s) => [s.webAnalyticsFilters, s.dateFilter, s.shouldFilterTestAccounts, s.conversionGoal, s.featureFlags], ( webAnalyticsFilters: WebAnalyticsPropertyFilters, dateFilter, shouldFilterTestAccounts, - conversionGoal + conversionGoal, + featureFlags ): RecordingUniversalFilters => { const filters: UniversalFiltersGroupValue[] = [...webAnalyticsFilters] - if (conversionGoal) { + if (conversionGoal && featureFlags[FEATURE_FLAGS.WEB_ANALYTICS_CONVERSION_GOAL_FILTERS]) { if ('actionId' in conversionGoal) { filters.push({ id: conversionGoal.actionId,