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: filter out HEAD requests from click tracking to prevent inflated metrics

Bharath Lakshman Kumar3b3a62ee9458
diff --git a/apps/web/lib/tinybird/record-click.ts b/apps/web/lib/tinybird/record-click.ts
index 4b0863b429..ef4c10566e 100644
--- a/apps/web/lib/tinybird/record-click.ts
+++ b/apps/web/lib/tinybird/record-click.ts
@@ -63,6 +63,10 @@ export async function recordClick({
return null;
}
+ if (req.method === "HEAD") {
+ return null;
+ }
+
const isBot = detectBot(req);
// don't record clicks from bots