Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update get-analytics.ts

Steven Tey1e83fb952a02
diff --git a/apps/web/lib/analytics/get-analytics.ts b/apps/web/lib/analytics/get-analytics.ts
index 8113c19a35..617c4fd014 100644
--- a/apps/web/lib/analytics/get-analytics.ts
+++ b/apps/web/lib/analytics/get-analytics.ts
@@ -40,11 +40,14 @@ export const getAnalytics = async (params: AnalyticsFilters) => {
// 1. linkId is defined
// 2. type is count
// 3. interval is all
- // 4. no other dimensional filters are applied
+ // 4. no custom start or end date is provided
+ // 5. no other dimensional filters are applied
if (
linkId &&
groupBy === "count" &&
interval === "all" &&
+ !start &&
+ !end &&
DIMENSIONAL_ANALYTICS_FILTERS.every(
(filter) => !params[filter as keyof AnalyticsFilters],
)