Skip to content

Commit

Permalink
Add web analytics to posthog 3000
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Oct 25, 2023
1 parent e200837 commit 007a777
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ import { sceneLogic } from 'scenes/sceneLogic'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'
import {
IconHome,
IconApps,
IconDashboard,
IconDatabase,
IconApps,
IconGraph,
IconHome,
IconLive,
IconPeople,
IconPerson,
IconQuestion,
IconPeople,
IconRewindPlay,
IconTestTube,
IconToggle,
IconRewindPlay,
IconGraph,
IconToolbar,
IconLive,
} from '@posthog/icons'
import { urls } from 'scenes/urls'
import { annotationsSidebarLogic } from './sidebars/annotations'
Expand All @@ -36,6 +36,8 @@ import { featureFlagsSidebarLogic } from './sidebars/featureFlags'
import { insightsSidebarLogic } from './sidebars/insights'
import { personsAndGroupsSidebarLogic } from './sidebars/personsAndGroups'
import { toolbarSidebarLogic } from './sidebars/toolbar'
import { IconWeb } from 'lib/lemon-ui/icons'
import { isNotNil } from 'lib/utils'

/** Multi-segment item keys are joined using this separator for easy comparisons. */
export const ITEM_KEY_PART_SEPARATOR = '::'
Expand Down Expand Up @@ -330,6 +332,14 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
logic: isUsingSidebar ? insightsSidebarLogic : undefined,
to: isUsingSidebar ? undefined : urls.savedInsights(),
},
featureFlags[FEATURE_FLAGS.WEB_ANALYTICS]
? {
identifier: Scene.WebAnalytics,
label: 'Web Analytics',
icon: <IconWeb />,
to: isUsingSidebar ? undefined : urls.webAnalytics(),
}
: null,
{
identifier: Scene.Replay,
label: 'Session Replay',
Expand Down Expand Up @@ -357,7 +367,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
logic: isUsingSidebar ? toolbarSidebarLogic : undefined,
to: isUsingSidebar ? undefined : urls.toolbarLaunch(),
},
],
].filter(isNotNil),
[
{
identifier: Scene.Apps,
Expand Down

0 comments on commit 007a777

Please sign in to comment.