0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Updated stats page to show visits instead of hits (#21133)

closes:
https://linear.app/tryghost/issue/ANAL-102/visits-on-tables-is-actually-displaying-pageviews

- The expectation is that the UI shows unique visits, not pageviews for
the breakdown charts
This commit is contained in:
Hannah Wolfe 2024-09-26 14:50:30 +01:00 committed by GitHub
parent f19c01a11f
commit 68be1f95b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View file

@ -60,7 +60,7 @@ export default class TechnicalComponent extends Component {
const transformedData = (data ?? []).map((item, index) => ({
name: item[indexBy].charAt(0).toUpperCase() + item[indexBy].slice(1),
value: item.hits,
value: item.visits,
color: colorPalette[index]
}));
@ -101,7 +101,7 @@ export default class TechnicalComponent extends Component {
loading={loading}
error={error}
index={indexBy}
categories={['hits']}
categories={['visits']}
colorPalette={colorPalette}
backgroundColor="transparent"
fontSize="13px"

View file

@ -73,9 +73,9 @@ export default class TopLocations extends Component {
</span>
)
}}
categories={['hits']}
categories={['visits']}
categoryConfig={{
hits: {
visits: {
label: <span className="gh-stats-data-header">Visits</span>,
renderValue: ({value}) => <span className="gh-stats-data-value">{formatNumber(value)}</span>
}

View file

@ -82,9 +82,9 @@ export default class TopPages extends Component {
</span>
)
}}
categories={['hits']}
categories={['visits']}
categoryConfig={{
hits: {
visits: {
label: <span className="gh-stats-data-header">Visits</span>,
renderValue: ({value}) => <span className="gh-stats-data-value">{formatNumber(value)}</span>
}

View file

@ -81,9 +81,9 @@ export default class TopSources extends Component {
</span>
)
}}
categories={['hits']}
categories={['visits']}
categoryConfig={{
hits: {
visits: {
label: <span className="gh-stats-data-header">Visits</span>,
renderValue: ({value}) => <span className="gh-stats-data-value">{formatNumber(value)}</span>
}

View file

@ -126,9 +126,9 @@ export default class AllStatsModal extends Component {
</span>
)
}}
categories={['hits']}
categories={['visits']}
categoryConfig={{
hits: {
visits: {
label: <span className="gh-stats-data-header">Visits</span>,
renderValue: ({value}) => <span className="gh-stats-data-value">{formatNumber(value)}</span>
}