improvements(dashboard): add headers to all overview tables to get a better understanding if its sessions or page views

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-01-21 15:21:24 +00:00
parent b38f3913c3
commit 64a7e2ab26
7 changed files with 93 additions and 6 deletions

View File

@@ -31,6 +31,9 @@ export default function OverviewTopDevices({
title: 'Top devices',
btn: 'Devices',
chart: {
options: {
columns: ['Device', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -64,6 +67,9 @@ export default function OverviewTopDevices({
title: 'Top browser',
btn: 'Browser',
chart: {
options: {
columns: ['Browser', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -98,6 +104,7 @@ export default function OverviewTopDevices({
btn: 'Browser Version',
chart: {
options: {
columns: ['Version', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return name[1] || NOT_SET_VALUE;
},
@@ -139,6 +146,9 @@ export default function OverviewTopDevices({
title: 'Top OS',
btn: 'OS',
chart: {
options: {
columns: ['OS', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -173,6 +183,7 @@ export default function OverviewTopDevices({
btn: 'OS Version',
chart: {
options: {
columns: ['Version', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return name[1] || NOT_SET_VALUE;
},
@@ -214,6 +225,9 @@ export default function OverviewTopDevices({
title: 'Top Brands',
btn: 'Brands',
chart: {
options: {
columns: ['Brand', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -248,6 +262,7 @@ export default function OverviewTopDevices({
btn: 'Models',
chart: {
options: {
columns: ['Model', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return name[1] || NOT_SET_VALUE;
},

View File

@@ -167,7 +167,7 @@ export default function OverviewTopEvents({
</WidgetHead>
<WidgetBody>
<ReportChart
options={{ hideID: true }}
options={{ hideID: true, columns: ['Event', 'Count'] }}
report={{
...widget.chart.report,
previous: false,

View File

@@ -31,6 +31,7 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
btn: 'Countries',
chart: {
options: {
columns: ['Country', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return getCountry(name[0]) || NOT_SET_VALUE;
},
@@ -69,6 +70,7 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
btn: 'Regions',
chart: {
options: {
columns: ['Region', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return name[1] || NOT_SET_VALUE;
},
@@ -111,6 +113,7 @@ export default function OverviewTopGeo({ projectId }: OverviewTopGeoProps) {
btn: 'Cities',
chart: {
options: {
columns: ['City', isPageFilter ? 'Views' : 'Sessions'],
renderSerieName(name) {
return name[1] || NOT_SET_VALUE;
},

View File

@@ -50,6 +50,7 @@ export default function OverviewTopPages({ projectId }: OverviewTopPagesProps) {
chart: {
options: {
renderSerieName,
columns: ['URL', 'Views'],
},
report: {
limit: 10,
@@ -89,6 +90,7 @@ export default function OverviewTopPages({ projectId }: OverviewTopPagesProps) {
btn: 'Entries',
chart: {
options: {
columns: ['URL', 'Sessions'],
renderSerieName,
},
report: {
@@ -129,6 +131,7 @@ export default function OverviewTopPages({ projectId }: OverviewTopPagesProps) {
btn: 'Exits',
chart: {
options: {
columns: ['URL', 'Sessions'],
renderSerieName,
},
report: {

View File

@@ -31,6 +31,9 @@ export default function OverviewTopSources({
title: 'Top sources',
btn: 'All',
chart: {
options: {
columns: ['Source', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -64,6 +67,9 @@ export default function OverviewTopSources({
title: 'Top urls',
btn: 'URLs',
chart: {
options: {
columns: ['URL', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -97,6 +103,9 @@ export default function OverviewTopSources({
title: 'Top types',
btn: 'Types',
chart: {
options: {
columns: ['Type', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -130,6 +139,9 @@ export default function OverviewTopSources({
title: 'UTM Source',
btn: 'Source',
chart: {
options: {
columns: ['Utm Source', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -163,6 +175,9 @@ export default function OverviewTopSources({
title: 'UTM Medium',
btn: 'Medium',
chart: {
options: {
columns: ['Utm Medium', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -196,6 +211,9 @@ export default function OverviewTopSources({
title: 'UTM Campaign',
btn: 'Campaign',
chart: {
options: {
columns: ['Utm Campaign', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -229,6 +247,9 @@ export default function OverviewTopSources({
title: 'UTM Term',
btn: 'Term',
chart: {
options: {
columns: ['Utm Term', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -262,6 +283,9 @@ export default function OverviewTopSources({
title: 'UTM Content',
btn: 'Content',
chart: {
options: {
columns: ['Utm Content', isPageFilter ? 'Views' : 'Sessions'],
},
report: {
limit: 10,
projectId,
@@ -319,6 +343,7 @@ export default function OverviewTopSources({
previous: false,
}}
options={{
...widget.chart.options,
renderSerieName: (name) =>
name[0] === NOT_SET_VALUE ? 'Direct / Not set' : name[0],
onClick: (item) => {