From e6b1f8a8bfb7b7c747efef5e75d83a56564e9df7 Mon Sep 17 00:00:00 2001 From: Princi Vershwal Date: Tue, 2 Jul 2024 12:17:13 +0530 Subject: [PATCH] Fixed analytics sources to not be case sensitive (#20506) fixes https://linear.app/tryghost/issue/ENG-925/analytics-sources-shouldnt-be-case-sensitive --- ghost/admin/app/services/dashboard-stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/services/dashboard-stats.js b/ghost/admin/app/services/dashboard-stats.js index 0fc19af58b..0c17716fff 100644 --- a/ghost/admin/app/services/dashboard-stats.js +++ b/ghost/admin/app/services/dashboard-stats.js @@ -250,7 +250,7 @@ export default class DashboardStatsService extends Service { return stat.date >= moment().add(-this.chartDays, 'days').format('YYYY-MM-DD'); }).reduce((acc, stat) => { const statSource = stat.source ?? ''; - const existingSource = acc.find(s => s.source === statSource); + const existingSource = acc.find(s => s.source.toLowerCase() === statSource.toLowerCase()); if (existingSource) { existingSource.signups += stat.signups || 0; existingSource.paidConversions += stat.paidConversions || 0;