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.

remove root from recordClick

Steven Teyefd3460c2a19
diff --git a/apps/web/lib/middleware/root.ts b/apps/web/lib/middleware/root.ts
index 9599f67e34..87d53849ff 100644
--- a/apps/web/lib/middleware/root.ts
+++ b/apps/web/lib/middleware/root.ts
@@ -39,7 +39,7 @@ export default async function RootMiddleware(
const { id, url, rewrite, iframeable } = link;
// record clicks on root page
- ev.waitUntil(recordClick({ req, id, ...(url && { url }), root: true }));
+ ev.waitUntil(recordClick({ req, id, ...(url && { url }) }));
if (!url) {
// rewrite to placeholder page unless the user defines a site to redirect to
diff --git a/apps/web/lib/tinybird.ts b/apps/web/lib/tinybird.ts
index 979c37938b..147f45722e 100644
--- a/apps/web/lib/tinybird.ts
+++ b/apps/web/lib/tinybird.ts
@@ -17,12 +17,10 @@ export async function recordClick({
req,
id,
url,
- root,
}: {
req: NextRequest;
id: string;
url?: string;
- root?: boolean;
}) {
const isBot = detectBot(req);
if (isBot) {