implement URL pageview metric/expanded metric

This commit is contained in:
Francis Cao committed 2026-05-07 16:59:30 -07:00
1 parent 1b61ee4692
commit fa182d0947
10 files changed
+51 -31

No files matched your search

@@ -49,6 +49,7 @@ export const CATEGORIES = [
const METRIC_TYPES = [
{ label: 'Path', value: 'path' },
{ label: 'URL', value: 'fullPath' },
{ label: 'Entry page', value: 'entry' },
{ label: 'Exit page', value: 'exit' },
{ label: 'Title', value: 'title' },
+1 -1
View File
@@ -10,7 +10,7 @@ import { WebsiteChart } from '@/app/(main)/websites/[websiteId]/WebsiteChart';
import { PageBody } from '@/components/common/PageBody';
import { Panel } from '@/components/common/Panel';
const excludedIds = ['path', 'entry', 'exit', 'title', 'language', 'screen', 'event'];
const excludedIds = ['path', 'fullPath', 'entry', 'exit', 'title', 'language', 'screen', 'event'];
export function LinkPage({
linkId,
@@ -10,7 +10,7 @@ import { WebsiteChart } from '@/app/(main)/websites/[websiteId]/WebsiteChart';
import { PageBody } from '@/components/common/PageBody';
import { Panel } from '@/components/common/Panel';
const excludedIds = ['path', 'entry', 'exit', 'title', 'language', 'screen', 'event'];
const excludedIds = ['path', 'fullPath', 'entry', 'exit', 'title', 'language', 'screen', 'event'];
export function PixelPage({
pixelId,
@@ -25,6 +25,7 @@ import {
Tag,
Target,
Type,
Waypoints,
} from '@/components/icons';
import { Lightning } from '@/components/svg';
@@ -45,7 +46,7 @@ export function WebsiteExpandedMenu({
const items = [
{
label: 'URL',
label: t(labels.pages),
items: [
{
id: 'path',
@@ -53,6 +54,12 @@ export function WebsiteExpandedMenu({
path: updateParams({ view: 'path' }),
icon: <SquareSlash />,
},
{
id: 'fullPath',
label: t(labels.url),
path: updateParams({ view: 'fullPath' }),
icon: <Waypoints />,
},
{
id: 'entry',
label: t(labels.entry),
@@ -17,6 +17,7 @@ export function WebsiteExpandedView({
const {
query: { view },
} = useNavigation();
const title = view === 'fullPath' ? t(labels.url) : t(labels[view]);
return (
<Column height="100%" overflow="hidden" gap>
@@ -44,12 +45,7 @@ export function WebsiteExpandedView({
<WebsiteExpandedMenu excludedIds={excludedIds} />
</Column>
<Column id="metrics-expanded-table" overflow="hidden">
<MetricsExpandedTable
title={t(labels[view])}
type={view}
websiteId={websiteId}
onClose={onClose}
/>
<MetricsExpandedTable title={title} type={view} websiteId={websiteId} onClose={onClose} />
</Column>
</Grid>
</Column>
@@ -26,12 +26,16 @@ export function WebsitePanels({ websiteId }: { websiteId: string }) {
<Tabs>
<TabList>
<Tab id="path">{t(labels.path)}</Tab>
<Tab id="fullPath">{t(labels.url)}</Tab>
<Tab id="entry">{t(labels.entry)}</Tab>
<Tab id="exit">{t(labels.exit)}</Tab>
</TabList>
<TabPanel id="path">
<MetricsTable type="path" title={t(labels.path)} {...tableProps} />
</TabPanel>
<TabPanel id="fullPath">
<MetricsTable type="fullPath" title={t(labels.url)} {...tableProps} />
</TabPanel>
<TabPanel id="entry">
<MetricsTable type="entry" title={t(labels.path)} {...tableProps} />
</TabPanel>