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.

add top_partners to SINGULAR_ANALYTICS_ENDPOINTS

Steven Teye70f9d3aa8e8
diff --git a/apps/web/lib/analytics/constants.ts b/apps/web/lib/analytics/constants.ts
index b48666dc25..04ac1c8020 100644
--- a/apps/web/lib/analytics/constants.ts
+++ b/apps/web/lib/analytics/constants.ts
@@ -91,6 +91,7 @@ export const VALID_ANALYTICS_ENDPOINTS = [
] as const;
export const SINGULAR_ANALYTICS_ENDPOINTS = {
+ timeseries: "start",
continents: "continent",
regions: "region",
countries: "country",
@@ -110,11 +111,11 @@ export const SINGULAR_ANALYTICS_ENDPOINTS = {
top_folders: "folderId",
top_link_tags: "tagIds",
top_domains: "domain",
- top_links: "link",
+ top_links: "linkId",
top_urls: "url",
top_base_urls: "url",
top_groups: "groupId",
- timeseries: "start",
+ top_partners: "partnerId",
};
export const VALID_ANALYTICS_FILTERS = [
diff --git a/apps/web/ui/analytics/utils.ts b/apps/web/ui/analytics/utils.ts
index c7c405bcb0..7f60f212b4 100644
--- a/apps/web/ui/analytics/utils.ts
+++ b/apps/web/ui/analytics/utils.ts
@@ -60,7 +60,6 @@ export function useAnalyticsFilterOption(
// else, we need to remove the filter for that groupBy param
(() => {
if (!groupBy || !options?.omitGroupByFilterKey) return undefined;
- if (groupBy === "top_links") return ["linkId"];
return SINGULAR_ANALYTICS_ENDPOINTS[groupBy]
? SINGULAR_ANALYTICS_ENDPOINTS[groupBy]
: undefined;