Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web-analytics): Add web analytics to posthog3000 #18194

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,20 @@ 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,
IconPieChart,
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 +37,7 @@ import { featureFlagsSidebarLogic } from './sidebars/featureFlags'
import { insightsSidebarLogic } from './sidebars/insights'
import { personsAndGroupsSidebarLogic } from './sidebars/personsAndGroups'
import { toolbarSidebarLogic } from './sidebars/toolbar'
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: <IconPieChart />,
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@medv/finder": "^2.1.0",
"@microlink/react-json-view": "^1.21.3",
"@monaco-editor/react": "4.4.6",
"@posthog/icons": "0.1.4",
"@posthog/icons": "0.1.21",
"@posthog/plugin-scaffold": "^1.4.3",
"@react-hook/size": "^2.1.2",
"@rrweb/types": "^2.0.0-alpha.11",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading