Skip to content

Commit 792bf79

Browse files
authored
Fixed locations tab showing in analytics when web analytics is disabled (#24438)
https://linear.app/ghost/issue/PROD-2304/locations-tab-should-be-hidden-when-web-analytics-is-turned-off Currently the "Locations" tab in the analytics view is still showing in the header when web analytics is disabled (either by the user, or plan limit, or missing configuration). This tab only includes data from Tinybird, and it redirects to the Overview tab if you try to select it with web analytics disabled. This commit hides the link as well.
1 parent fca64b6 commit 792bf79

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/stats/src/views/Stats/layout/StatsHeader.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ const StatsHeader:React.FC<StatsHeaderProps> = ({
7979
navigate('/growth/');
8080
}}>Growth</PageMenuItem>
8181

82-
<PageMenuItem value="/locations/" onClick={() => {
83-
navigate('/locations/');
84-
}}>Locations</PageMenuItem>
82+
{appSettings?.analytics.webAnalytics && (
83+
<PageMenuItem value="/locations/" onClick={() => {
84+
navigate('/locations/');
85+
}}>Locations</PageMenuItem>
86+
)}
8587
</PageMenu>
8688
<NavbarActions>
8789
{children}

0 commit comments

Comments
 (0)