improve(dashboard): make pages page better (ux and features)
This commit is contained in:
@@ -617,7 +617,7 @@ export async function getTopPages({
|
||||
search?: string;
|
||||
}) {
|
||||
const res = await chQuery<IServicePage>(`
|
||||
SELECT path, count(*) as count, project_id, first_value(created_at) as first_seen, max(properties['__title']) as title, origin
|
||||
SELECT path, count(*) as count, project_id, first_value(created_at) as first_seen, last_value(properties['__title']) as title, origin
|
||||
FROM ${TABLE_NAMES.events}
|
||||
WHERE name = 'screen_view'
|
||||
AND project_id = ${escape(projectId)}
|
||||
|
||||
@@ -389,6 +389,7 @@ export class OverviewService {
|
||||
.select([
|
||||
'origin',
|
||||
'path',
|
||||
`last_value(properties['__title']) as title`,
|
||||
'uniq(session_id) as count',
|
||||
'round(avg(duration)/1000, 2) as avg_duration',
|
||||
])
|
||||
@@ -427,12 +428,14 @@ export class OverviewService {
|
||||
.with('page_stats', pageStatsQuery)
|
||||
.with('bounce_stats', bounceStatsQuery)
|
||||
.select<{
|
||||
title: string;
|
||||
origin: string;
|
||||
path: string;
|
||||
avg_duration: number;
|
||||
bounce_rate: number;
|
||||
sessions: number;
|
||||
}>([
|
||||
'p.title',
|
||||
'p.origin',
|
||||
'p.path',
|
||||
'p.avg_duration',
|
||||
|
||||
Reference in New Issue
Block a user