Skip to content

Commit 14e6ffe

Browse files
authored
Merge pull request #2310 from BharathxD/bugfix/head-requests
Fix click tracking bug by filtering HEAD requests
2 parents 66c8f0c + b8ea027 commit 14e6ffe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/web/lib/tinybird/record-click.ts

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ export async function recordClick({
6363
return null;
6464
}
6565

66+
// don't track HEAD requests to avoid non-user traffic from inflating click count
67+
if (req.method === "HEAD") {
68+
return null;
69+
}
70+
6671
const isBot = detectBot(req);
6772

6873
// don't record clicks from bots

0 commit comments

Comments
 (0)