Repository: PostHog/posthog
Pull request #30958: chore(taxonomy): move remaining constants to new taxonomy file
Author: login: thmsobrmlr
Created: 2025-04-08T19:34:45Z | Merged: 2025-04-09T13:20:26Z

## Problem

Follow up to https://github.com/PostHog/posthog/pull/30919 and https://github.com/PostHog/posthog/pull/30812

## Changes

- Removes unused constants in `taxonomy.tsx`. 
- Moves the remaining constants, which are only used frontend-side, to the new `taxonomy.tsx`.

## How did you test this code?

n/a


Diff:
diff --git a/frontend/src/lib/components/CommandBar/ActionInput.tsx b/frontend/src/lib/components/CommandBar/ActionInput.tsx
index 43e3d61cd25b..481df211af7d 100644
--- a/frontend/src/lib/components/CommandBar/ActionInput.tsx
+++ b/frontend/src/lib/components/CommandBar/ActionInput.tsx
@@ -16,10 +16,13 @@ type PrefixIconProps = {
 
 const PrefixIcon = ({ activeFlow }: PrefixIconProps): React.ReactElement | null => {
     if (activeFlow) {
-        return <activeFlow.icon className="palette__icon" /> ?? <IconPencil className="palette__icon" />
-    } else {
-        return <IconChevronRight className="palette__icon" />
+        return activeFlow.icon ? (
+            <activeFlow.icon className="palette__icon" />
+        ) : (
+            <IconPencil className="palette__icon" />
+        )
     }
+    return <IconChevronRight className="palette__icon" />
 }
 
 export const ActionInput = (): JSX.Element => {
diff --git a/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx b/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx
index 2bc98337bfc5..c29f560aba66 100644
--- a/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx
+++ b/frontend/src/lib/components/PropertiesTable/PropertiesTable.tsx
@@ -8,11 +8,6 @@ import { combineUrl } from 'kea-router'
 import { LemonButton } from 'lib/lemon-ui/LemonButton'
 import { LemonTable, LemonTableColumns, LemonTableProps } from 'lib/lemon-ui/LemonTable'
 import { userPreferencesLogic } from 'lib/logic/userPreferencesLogic'
-import {
-    CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS,
-    KNOWN_PROMOTED_PROPERTY_PARENTS,
-    POSTHOG_EVENT_PROMOTED_PROPERTIES,
-} from 'lib/taxonomy'
 import { isObject, isURL } from 'lib/utils'
 import { useMemo, useState } from 'react'
 import { NewProperty } from 'scenes/persons/NewProperty'
@@ -21,6 +16,11 @@ import { urls } from 'scenes/urls'
 
 import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'
 import { getCoreFilterDefinition } from '~/taxonomy/helpers'
+import {
+    CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS,
+    KNOWN_PROMOTED_PROPERTY_PARENTS,
+    POSTHOG_EVENT_PROMOTED_PROPERTIES,
+} from '~/taxonomy/taxonomy'
 import { CORE_FILTER_DEFINITIONS_BY_GROUP, PROPERTY_KEYS } from '~/taxonomy/taxonomy'
 import { PropertyDefinitionType, PropertyType } from '~/types'
 
diff --git a/frontend/src/lib/components/SceneDashboardChoice/SceneIcon.tsx b/frontend/src/lib/components/SceneDashboardChoice/SceneIcon.tsx
index bb2c97e554a8..a36f19eb09b1 100644
--- a/frontend/src/lib/components/SceneDashboardChoice/SceneIcon.tsx
+++ b/frontend/src/lib/components/SceneDashboardChoice/SceneIcon.tsx
@@ -11,7 +11,6 @@ export function SceneIcon(props: { scene: DashboardCompatibleScenes; size: 'smal
         return <IconPerson className={className} />
     } else if (props.scene === Scene.Person) {
         return <IconPerson className={className} />
-    } else {
-        return null
     }
+    return null
 }
diff --git a/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx b/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
index 739cb9818d2a..7011022d8016 100644
--- a/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
+++ b/frontend/src/lib/components/SocialLoginButton/SocialLoginIcon.tsx
@@ -18,7 +18,6 @@ export const SocialLoginIcon = ({
         return <IconGitlab {...props} />
     } else if (provider === 'saml') {
         return <IconKey {...props} />
-    } else {
-        return null
     }
+    return null
 }
diff --git a/frontend/src/lib/lemon-ui/LemonTable/sorting.tsx b/frontend/src/lib/lemon-ui/LemonTable/sorting.tsx
index faf206aea96f..b4f277d9406f 100644
--- a/frontend/src/lib/lemon-ui/LemonTable/sorting.tsx
+++ b/frontend/src/lib/lemon-ui/LemonTable/sorting.tsx
@@ -21,9 +21,8 @@ export function getNextSorting(
         return { columnKey: selectedColumnKey, order: 1 }
     } else if (currentSorting.order === 1) {
         return { columnKey: selectedColumnKey, order: -1 }
-    } else {
-        return null
     }
+    return null
 }
 
 export const SortingIndicator: React.FunctionComponent<
diff --git a/frontend/src/lib/taxonomy.test.tsx b/frontend/src/lib/taxonomy.test.tsx
deleted file mode 100644
index 8c23cb5b10ad..000000000000
--- a/frontend/src/lib/taxonomy.test.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { CAMPAIGN_PROPERTIES, SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS } from 'lib/taxonomy'
-
-import { CORE_FILTER_DEFINITIONS_BY_GROUP } from '~/taxonomy/taxonomy'
-import { CoreFilterDefinition } from '~/types'
-
-describe('taxonomy', () => {
-    describe('event properties', () => {
-        it('should have definitions for all campaign properties', () => {
-            const eventProperties = Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties)
-            for (const property of CAMPAIGN_PROPERTIES) {
-                expect(eventProperties).toContain(property)
-            }
-        })
-    })
-
-    describe('person properties', () => {
-        // check that initial properties have been set up correctly
-        it('should have an $initial_referring_domain property', () => {
-            const property: CoreFilterDefinition =
-                CORE_FILTER_DEFINITIONS_BY_GROUP.person_properties['$initial_referring_domain']
-            expect(property.label).toEqual('Initial Referring Domain')
-        })
-    })
-
-    describe('session properties', () => {
-        const sessionPropertyNames = Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties)
-        it('should have a $session_referring_domain property', () => {
-            const property: CoreFilterDefinition =
-                CORE_FILTER_DEFINITIONS_BY_GROUP.session_properties['$entry_referring_domain']
-            expect(property.label).toEqual('Entry Referring Domain')
-        })
-        it(`should have every property in SESSION_PROPERTIES_ADAPTED_FROM_PERSON`, () => {
-            for (const property of Array.from(SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS.keys())) {
-                expect(sessionPropertyNames).toContain('$entry_' + property.replace('$', ''))
-            }
-        })
-    })
-})
diff --git a/frontend/src/lib/taxonomy.tsx b/frontend/src/lib/taxonomy.tsx
deleted file mode 100644
index e239fa948913..000000000000
--- a/frontend/src/lib/taxonomy.tsx
+++ /dev/null
@@ -1,159 +0,0 @@
-/** Same as https://github.com/PostHog/posthog-js/blob/master/src/utils/event-utils.ts */
-// Ideally this would be imported from posthog-js, we just need to start exporting the list there
-export const CAMPAIGN_PROPERTIES: string[] = [
-    'utm_source',
-    'utm_medium',
-    'utm_campaign',
-    'utm_content',
-    'utm_term',
-    'gclid', // google ads
-    'gad_source', // google ads
-    'gclsrc', // google ads 360
-    'dclid', // google display ads
-    'gbraid', // google ads, web to app
-    'wbraid', // google ads, app to web
-    'fbclid', // facebook
-    'msclkid', // microsoft
-    'twclid', // twitter
-    'li_fat_id', // linkedin
-    'mc_cid', // mailchimp campaign id
-    'igshid', // instagram
-    'ttclid', // tiktok
-    'rdt_cid', // reddit
-    'irclid', // impact
-    '_kx', // klaviyo
-]
-
-export const SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS = new Set([
-    '$referring_domain',
-    'utm_source',
-    'utm_campaign',
-    'utm_medium',
-    'utm_content',
-    'utm_term',
-    'gclid',
-    'gad_source',
-    'gclsrc',
-    'dclid',
-    'gbraid',
-    'wbraid',
-    'fbclid',
-    'msclkid',
-    'twclid',
-    'li_fat_id',
-    'mc_cid',
-    'igshid',
-    'ttclid',
-    'rdt_cid',
-    'irclid',
-    '_kx',
-])
-
-export const SESSION_PROPERTIES_ALSO_INCLUDED_IN_EVENTS = new Set([
-    '$current_url', // Gets renamed to just $url
-    '$host',
-    '$pathname',
-    '$referrer',
-    ...SESSION_INITIAL_PROPERTIES_ADAPTED_FROM_EVENTS,
-])
-
-/**
- * these are properties that PostHog add to events they track for their own purposes
- * not part of the general taxonomy
- * but often more numerous than actual properties set on events and useful to hide
- * to make those properties discoverable
- */
-export const CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS = [
-    'billing_period_end',
-    'billing_period_start',
-    'current_amount_usd.data_warehouse',
-    'current_amount_usd.feature_flags',
-    'current_amount_usd.integrations',
-    'current_amount_usd.platform_and_support',
-    'current_amount_usd.product_analytics',
-    'current_amount_usd.session_replay',
-    'current_amount_usd.surveys',
-    'current_total_amount_usd',
-    'current_usage.data_warehouse',
-    'current_usage.feature_flags',
-    'current_usage.integrations',
-    'current_usage.platform_and_support',
-    'current_usage.product_analytics',
-    'current_usage.session_replay',
-    'current_usage.surveys',
-    'customer_deactivated',
-    'custom_limits.data_warehouse',
-    'custom_limits.feature_flags',
-    'custom_limits.integrations',
-    'custom_limits.platform_and_support',
-    'custom_limits.product_analytics',
-    'custom_limits.session_replay',
-    'custom_limits.surveys',
-    'custom_limits_usd.data_warehouse',
-    'custom_limits_usd.feature_flags',
-    'custom_limits_usd.integrations',
-    'custom_limits_usd.platform_and_support',
-    'custom_limits_usd.product_analytics',
-    'custom_limits_usd.session_replay',
-    'custom_limits_usd.surveys',
-    'free_allocation.data_warehouse',
-    'free_allocation.feature_flags',
-    'free_allocation.integrations',
-    'free_allocation.platform_and_support',
-    'free_allocation.product_analytics',
-    'free_allocation.session_replay',
-    'free_allocation.surveys',
-    'has_billing_plan',
-    'percentage_usage.data_warehouse',
-    'percentage_usage.feature_flags',
-    'percentage_usage.integrations',
-    'percentage_usage.platform_and_support',
-    'percentage_usage.product_analytics',
-    'percentage_usage.session_replay',
-    'percentage_usage.surveys',
-    'projected_usage.data_warehouse',
-    'projected_usage.feature_flags',
-    'projected_usage.integrations',
-    'projected_usage.platform_and_support',
-    'projected_usage.product_analytics',
-    'projected_usage.session_replay',
-    'projected_usage.surveys',
-    'unit_amount_usd.data_warehouse',
-    'unit_amount_usd.feature_flags',
-    'unit_amount_usd.integrations',
-    'unit_amount_usd.platform_and_support',
-    'unit_amount_usd.product_analytics',
-    'unit_amount_usd.session_replay',
-    'unit_amount_usd.surveys',
-    'usage_limit.data_warehouse',
-    'usage_limit.feature_flags',
-    'usage_limit.integrations',
-    'usage_limit.platform_and_support',
-    'usage_limit.product_analytics',
-    'usage_limit.session_replay',
-    'usage_limit.surveys',
-    'is_demo_project',
-    'realm',
-    'email_service_available',
-    'slack_service_available',
-    'commit_sha',
-]
-
-export const POSTHOG_EVENT_PROMOTED_PROPERTIES = {
-    $pageview: ['$current_url', 'title', '$referrer'],
-    $pageleave: ['$current_url', 'title', '$referrer'],
-    $groupidentify: ['$group_type', '$group_key', '$group_set'],
-    $screen: ['$screen_name'],
-    $web_vitals: [
-        '$web_vitals_FCP_value',
-        '$web_vitals_CLS_value',
-        '$web_vitals_INP_value',
-        '$web_vitals_LCP_value',
-        '$web_vitals_FCP_event',
-        '$web_vitals_CLS_event',
-        '$web_vitals_INP_event',
-        '$web_vitals_LCP_event',
-    ],
-    $set: ['$set', '$set_once'],
-}
-export type KNOWN_PROMOTED_PROPERTY_PARENTS = keyof typeof POSTHOG_EVENT_PROMOTED_PROPERTIES
diff --git a/frontend/src/scenes/activity/explore/EventDetails.tsx b/frontend/src/scenes/activity/explore/EventDetails.tsx
index f118515c20ff..3ff81ece81dd 100644
--- a/frontend/src/scenes/activity/explore/EventDetails.tsx
+++ b/frontend/src/scenes/activity/explore/EventDetails.tsx
@@ -10,13 +10,13 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton'
 import { LemonTableProps } from 'lib/lemon-ui/LemonTable'
 import { LemonTabs } from 'lib/lemon-ui/LemonTabs'
 import { Link } from 'lib/lemon-ui/Link'
-import { KNOWN_PROMOTED_PROPERTY_PARENTS } from 'lib/taxonomy'
 import { pluralize } from 'lib/utils'
 import { AutocaptureImageTab, autocaptureToImage } from 'lib/utils/event-property-utls'
 import { ConversationDisplay } from 'products/llm_observability/frontend/ConversationDisplay/ConversationDisplay'
 import { useState } from 'react'
 import { urls } from 'scenes/urls'
 
+import { KNOWN_PROMOTED_PROPERTY_PARENTS } from '~/taxonomy/taxonomy'
 import { CORE_FILTER_DEFINITIONS_BY_GROUP } from '~/taxonomy/taxonomy'
 import { EventType, PropertyDefinitionType } from '~/types'
 
diff --git a/frontend/src/scenes/dashboard/dashboards/templates/DashboardTemplatesTable.tsx b/frontend/src/scenes/dashboard/dashboards/templates/DashboardTemplatesTable.tsx
index 8f5e01fed23d..9ddfc194a694 100644
--- a/frontend/src/scenes/dashboard/dashboards/templates/DashboardTemplatesTable.tsx
+++ b/frontend/src/scenes/dashboard/dashboards/templates/DashboardTemplatesTable.tsx
@@ -40,9 +40,8 @@ export const DashboardTemplatesTable = (): JSX.Element | null => {
             render: (_, { scope }) => {
                 if (scope === 'global') {
                     return <LemonSnack>Official</LemonSnack>
-                } else {
-                    return <LemonSnack>Team</LemonSnack>
                 }
+                return <LemonSnack>Team</LemonSnack>
             },
         },
         {
diff --git a/frontend/src/scenes/groups/RelatedGroups.tsx b/frontend/src/scenes/groups/RelatedGroups.tsx
index c82ee3488aa3..b0ab0c2ade34 100644
--- a/frontend/src/scenes/groups/RelatedGroups.tsx
+++ b/frontend/src/scenes/groups/RelatedGroups.tsx
@@ -25,24 +25,22 @@ export function RelatedGroups({ groupTypeIndex, id }: Props): JSX.Element {
             render: function RenderActor(_, actor: ActorType) {
                 if (actor.type === 'group') {
                     return <>{capitalizeFirstLetter(aggregationLabel(actor.group_type_index).singular)}</>
-                } else {
-                    return (
-                        <>
-                            <IconPerson /> Person
-                        </>
-                    )
                 }
+                return (
+                    <>
+                        <IconPerson /> Person
+                    </>
+                )
             },
         },
         {
             title: 'id',
             key: 'id',
             render: function RenderActor(_, actor: ActorType) {
-                if (actor.type == 'group') {
+                if (actor.type === 'group') {
                     return <GroupActorDisplay actor={actor} />
-                } else {
-                    return <PersonDisplay person={actor} withIcon={false} />
                 }
+                return <PersonDisplay person={actor} withIcon={false} />
             },
         },
     ]
diff --git a/frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.tsx b/frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.tsx
index 78ff41348469..92463ec085cc 100644
--- a/frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.tsx
+++ b/frontend/src/scenes/session-recordings/player/inspector/components/ItemEvent.tsx
@@ -9,13 +9,13 @@ import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
 import { TitledSnack } from 'lib/components/TitledSnack'
 import { IconOpenInNew } from 'lib/lemon-ui/icons'
 import { Spinner } from 'lib/lemon-ui/Spinner'
-import { POSTHOG_EVENT_PROMOTED_PROPERTIES } from 'lib/taxonomy'
 import { autoCaptureEventToDescription, capitalizeFirstLetter, isString } from 'lib/utils'
 import { AutocaptureImageTab, AutocapturePreviewImage, autocaptureToImage } from 'lib/utils/event-property-utls'
 import { useState } from 'react'
 import { insightUrlForEvent } from 'scenes/insights/utils'
 import { eventPropertyFilteringLogic } from 'scenes/session-recordings/player/inspector/components/eventPropertyFilteringLogic'
 
+import { POSTHOG_EVENT_PROMOTED_PROPERTIES } from '~/taxonomy/taxonomy'
 import { CORE_FILTER_DEFINITIONS_BY_GROUP } from '~/taxonomy/taxonomy'
 
 import { InspectorListItemEvent } from '../playerInspectorLogic'
diff --git a/frontend/src/scenes/session-recordings/player/inspector/components/eventPropertyFilteringLogic.ts b/frontend/src/scenes/session-recordings/player/inspector/components/eventPropertyFilteringLogic.ts
index 90a1b4dec9de..1eeb31340771 100644
--- a/frontend/src/scenes/session-recordings/player/inspector/components/eventPropertyFilteringLogic.ts
+++ b/frontend/src/scenes/session-recordings/player/inspector/components/eventPropertyFilteringLogic.ts
@@ -1,8 +1,8 @@
 import { connect, kea, path, selectors } from 'kea'
 import { userPreferencesLogic } from 'lib/logic/userPreferencesLogic'
-import { CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS } from 'lib/taxonomy'
 import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
 
+import { CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS } from '~/taxonomy/taxonomy'
 import { PROPERTY_KEYS } from '~/taxonomy/taxonomy'
 
 import type { eventPropertyFilteringLogicType } from './eventPropertyFilteringLogicType'
diff --git a/frontend/src/taxonomy/taxonomy.tsx b/frontend/src/taxonomy/taxonomy.tsx
index df65c0a2fe08..fbb4e74c721a 100644
--- a/frontend/src/taxonomy/taxonomy.tsx
+++ b/frontend/src/taxonomy/taxonomy.tsx
@@ -24,3 +24,104 @@ CORE_FILTER_DEFINITIONS_BY_GROUP.events[''] = CORE_FILTER_DEFINITIONS_BY_GROUP.e
 delete CORE_FILTER_DEFINITIONS_BY_GROUP.events['All Events']
 
 export const PROPERTY_KEYS = Object.keys(CORE_FILTER_DEFINITIONS_BY_GROUP.event_properties)
+
+/**
+ * these are properties that PostHog add to events they track for their own purposes
+ * not part of the general taxonomy
+ * but often more numerous than actual properties set on events and useful to hide
+ * to make those properties discoverable
+ */
+export const CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS = [
+    'billing_period_end',
+    'billing_period_start',
+    'current_amount_usd.data_warehouse',
+    'current_amount_usd.feature_flags',
+    'current_amount_usd.integrations',
+    'current_amount_usd.platform_and_support',
+    'current_amount_usd.product_analytics',
+    'current_amount_usd.session_replay',
+    'current_amount_usd.surveys',
+    'current_total_amount_usd',
+    'current_usage.data_warehouse',
+    'current_usage.feature_flags',
+    'current_usage.integrations',
+    'current_usage.platform_and_support',
+    'current_usage.product_analytics',
+    'current_usage.session_replay',
+    'current_usage.surveys',
+    'customer_deactivated',
+    'custom_limits.data_warehouse',
+    'custom_limits.feature_flags',
+    'custom_limits.integrations',
+    'custom_limits.platform_and_support',
+    'custom_limits.product_analytics',
+    'custom_limits.session_replay',
+    'custom_limits.surveys',
+    'custom_limits_usd.data_warehouse',
+    'custom_limits_usd.feature_flags',
+    'custom_limits_usd.integrations',
+    'custom_limits_usd.platform_and_support',
+    'custom_limits_usd.product_analytics',
+    'custom_limits_usd.session_replay',
+    'custom_limits_usd.surveys',
+    'free_allocation.data_warehouse',
+    'free_allocation.feature_flags',
+    'free_allocation.integrations',
+    'free_allocation.platform_and_support',
+    'free_allocation.product_analytics',
+    'free_allocation.session_replay',
+    'free_allocation.surveys',
+    'has_billing_plan',
+    'percentage_usage.data_warehouse',
+    'percentage_usage.feature_flags',
+    'percentage_usage.integrations',
+    'percentage_usage.platform_and_support',
+    'percentage_usage.product_analytics',
+    'percentage_usage.session_replay',
+    'percentage_usage.surveys',
+    'projected_usage.data_warehouse',
+    'projected_usage.feature_flags',
+    'projected_usage.integrations',
+    'projected_usage.platform_and_support',
+    'projected_usage.product_analytics',
+    'projected_usage.session_replay',
+    'projected_usage.surveys',
+    'unit_amount_usd.data_warehouse',
+    'unit_amount_usd.feature_flags',
+    'unit_amount_usd.integrations',
+    'unit_amount_usd.platform_and_support',
+    'unit_amount_usd.product_analytics',
+    'unit_amount_usd.session_replay',
+    'unit_amount_usd.surveys',
+    'usage_limit.data_warehouse',
+    'usage_limit.feature_flags',
+    'usage_limit.integrations',
+    'usage_limit.platform_and_support',
+    'usage_limit.product_analytics',
+    'usage_limit.session_replay',
+    'usage_limit.surveys',
+    'is_demo_project',
+    'realm',
+    'email_service_available',
+    'slack_service_available',
+    'commit_sha',
+]
+
+export const POSTHOG_EVENT_PROMOTED_PROPERTIES = {
+    $pageview: ['$current_url', 'title', '$referrer'],
+    $pageleave: ['$current_url', 'title', '$referrer'],
+    $groupidentify: ['$group_type', '$group_key', '$group_set'],
+    $screen: ['$screen_name'],
+    $web_vitals: [
+        '$web_vitals_FCP_value',
+        '$web_vitals_CLS_value',
+        '$web_vitals_INP_value',
+        '$web_vitals_LCP_value',
+        '$web_vitals_FCP_event',
+        '$web_vitals_CLS_event',
+        '$web_vitals_INP_event',
+        '$web_vitals_LCP_event',
+    ],
+    $set: ['$set', '$set_once'],
+}
+export type KNOWN_PROMOTED_PROPERTY_PARENTS = keyof typeof POSTHOG_EVENT_PROMOTED_PROPERTIES
diff --git a/frontend/src/toolbar/debug/eventDebugMenuLogic.ts b/frontend/src/toolbar/debug/eventDebugMenuLogic.ts
index 369babe2dec0..9ad025144ff6 100644
--- a/frontend/src/toolbar/debug/eventDebugMenuLogic.ts
+++ b/frontend/src/toolbar/debug/eventDebugMenuLogic.ts
@@ -1,8 +1,8 @@
 import { actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'
-import { CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS } from 'lib/taxonomy'
 import { uuid } from 'lib/utils'
 import { permanentlyMount } from 'lib/utils/kea-logic-builders'
 
+import { CLOUD_INTERNAL_POSTHOG_PROPERTY_KEYS } from '~/taxonomy/taxonomy'
 import { CORE_FILTER_DEFINITIONS_BY_GROUP, PROPERTY_KEYS } from '~/taxonomy/taxonomy'
 import { toolbarConfigLogic } from '~/toolbar/toolbarConfigLogic'
 import { EventType } from '~/types'
diff --git a/posthog/taxonomy/taxonomy.py b/posthog/taxonomy/taxonomy.py
index 190b9f8434a0..022e4be3be71 100644
--- a/posthog/taxonomy/taxonomy.py
+++ b/posthog/taxonomy/taxonomy.py
@@ -14,28 +14,32 @@ class CoreFilterDefinition(TypedDict):
     ignored_in_assistant: NotRequired[bool]
 
 
+"""
+Same as https://github.com/PostHog/posthog-js/blob/master/src/utils/event-utils.ts
+Ideally this would be imported from one place.
+"""
 CAMPAIGN_PROPERTIES: list[str] = [
     "utm_source",
     "utm_medium",
     "utm_campaign",
     "utm_content",
     "utm_term",
-    "gclid",
-    "gad_source",
-    "gclsrc",
-    "dclid",
-    "gbraid",
-    "wbraid",
-    "fbclid",
-    "msclkid",
-    "twclid",
-    "li_fat_id",
-    "mc_cid",
-    "igshid",
-    "ttclid",
-    "rdt_cid",
-    "irclid",
-    "_kx",
+    "gclid",  # google ads
+    "gad_source",  # google ads
+    "gclsrc",  # google ads 360
+    "dclid",  # google display ads
+    "gbraid",  # google ads, web to app
+    "wbraid",  # google ads, app to web
+    "fbclid",  # facebook
+    "msclkid",  # microsoft
+    "twclid",  # twitter
+    "li_fat_id",  # linkedin
+    "mc_cid",  # mailchimp campaign id
+    "igshid",  # instagram
+    "ttclid",  # tiktok
+    "rdt_cid",  # reddit
+    "irclid",  # impact
+    "_kx",  # klaviyo
 ]
 
 PERSON_PROPERTIES_ADAPTED_FROM_EVENT: set[str] = {


Reviews:
user: login: thmsobrmlr
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-09T07:06:32Z
user: login: greptile-apps[bot]
body: 
## PR Summary

Refactored taxonomy constants have been centralized in a new file, with multiple components updated to import from the new location, clean up control flows, and remove redundant code.

- Moved constants from **frontend/src/lib/taxonomy.tsx** to **frontend/src/taxonomy/taxonomy.tsx** (and updated PostHog Python definitions accordingly).
- Updated imports in components like **PropertiesTable**, **ActionInput**, and **ItemEvent** to reference the new taxonomy file.
- Removed the obsolete **taxonomy.test.tsx**; verify tests still cover migrated constants.
- Simplified control flows in **SceneIcon** and **SocialLoginIcon**, maintaining functionality while reducing unnecessary branches.

<sub>15 file(s) reviewed, 2 comment(s)</sub>
<sub>[Edit PR Review Bot Settings](https://app.greptile.com/review/github) | [Greptile](https://greptile.com?utm_source=greptile_expert&utm_medium=github&utm_campaign=code_reviews&utm_content=posthog_30958)</sub>
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T07:07:25Z
user: login: HamedMP
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T13:19:12Z

Review comments:
diff_hunk: @@ -17,9 +17,8 @@ type PrefixIconProps = {
 const PrefixIcon = ({ activeFlow }: PrefixIconProps): React.ReactElement | null => {
     if (activeFlow) {
         return <activeFlow.icon className="palette__icon" /> ?? <IconPencil className="palette__icon" />
path: frontend/src/lib/components/CommandBar/ActionInput.tsx
user: login: greptile-apps[bot]
body: style: Consider explicitly checking for the existence of activeFlow.icon rather than relying on the nullish coalescing operator with a JSX element.
created_at: 2025-04-09T07:05:54Z
author_association: CONTRIBUTOR
diff_hunk: @@ -17,9 +17,8 @@ type PrefixIconProps = {
 const PrefixIcon = ({ activeFlow }: PrefixIconProps): React.ReactElement | null => {
     if (activeFlow) {
         return <activeFlow.icon className="palette__icon" /> ?? <IconPencil className="palette__icon" />
-    } else {
-        return <IconChevronRight className="palette__icon" />
     }
+    return <IconChevronRight className="palette__icon" />
path: frontend/src/lib/components/CommandBar/ActionInput.tsx
user: login: thmsobrmlr
body: There are a couple of unrelated changes like this due to running `eslint` / `prettier` after using VS Code's refactor.
created_at: 2025-04-09T07:06:32Z
author_association: COLLABORATOR
diff_hunk: @@ -40,9 +39,8 @@ export function RelatedGroups({ groupTypeIndex, id }: Props): JSX.Element {
             render: function RenderActor(_, actor: ActorType) {
                 if (actor.type == 'group') {
path: frontend/src/scenes/groups/RelatedGroups.tsx
user: login: greptile-apps[bot]
body: style: Use strict equality (===) for consistency (actor.type === 'group').

```suggestion
                if (actor.type === 'group') {
```
created_at: 2025-04-09T07:06:33Z
author_association: CONTRIBUTOR

PR comments:
user: login: posthog-bot
created_at: 2025-04-09T07:15:47Z
body: ## 📸 UI snapshots have been updated

**1** snapshot changes in total. **0** added, **1** modified, **0** deleted:

- **`chromium`**: **0** added, **1** modified, **0** deleted ([diff for shard 5](https://github.com/PostHog/posthog/pull/30958/commits/37d99c2fce01cb6efcae3dbcfb530995d8d6d1a1))
- `webkit`: **0** added, **0** modified, **0** deleted

Triggered by [this commit](https://github.com/PostHog/posthog/pull/30958/commits/0ffc6803c1b06fe8bd557c8480448c99fe7c6865).

👉 **[Review this PR's diff of snapshots.](https://github.com/PostHog/posthog/pull/30958/files#:~:text=frontend/__snapshots__/)**
author_association: CONTRIBUTOR
user: login: posthog-bot
created_at: 2025-04-09T07:24:59Z
body: ## 📸 UI snapshots have been updated

**1** snapshot changes in total. **0** added, **1** modified, **0** deleted:

- **`chromium`**: **0** added, **1** modified, **0** deleted ([diff for shard 5](https://github.com/PostHog/posthog/pull/30958/commits/8dc574e14b8c27ec09a40daab1bed0edce127d30))
- `webkit`: **0** added, **0** modified, **0** deleted

Triggered by [this commit](https://github.com/PostHog/posthog/pull/30958/commits/18aa471c0d5560df9b46fe4714cc2e6e1e96e6ee).

👉 **[Review this PR's diff of snapshots.](https://github.com/PostHog/posthog/pull/30958/files#:~:text=frontend/__snapshots__/)**
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-04-09T07:34:53Z
body: **Size Change:** -459 B (0%) 

**Total Size:** 13.2 MB



<details><summary>ℹ️ <strong>View Unchanged</strong></summary>

| Filename | Size | Change |
| :--- | :---: | :---: |
| `frontend/dist/toolbar.js` | 13.2 MB | -459 B (0%) |

</details>



<a href="https://github.com/preactjs/compressed-size-action"><sub>compressed-size-action</sub></a>
author_association: CONTRIBUTOR