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.

fix issue with key

Steven Teyb5eb13da1343
diff --git a/apps/web/ui/analytics/toggle.tsx b/apps/web/ui/analytics/toggle.tsx
index ade40105a0..a39366c920 100644
--- a/apps/web/ui/analytics/toggle.tsx
+++ b/apps/web/ui/analytics/toggle.tsx
@@ -328,7 +328,7 @@ export default function Toggle() {
key === "link"
? {
domain: new URL(value).hostname,
- key: value.split("/").at(-1) ?? "",
+ key: new URL(value).pathname.slice(1) || "_root",
}
: {
[key]: value,