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.

Skip detectBot for /track/open (#3646)

Steven Tey165280ad1ba7
diff --git a/apps/web/lib/tinybird/record-click.ts b/apps/web/lib/tinybird/record-click.ts
index f3e0e59f81..7950aaabcc 100644
--- a/apps/web/lib/tinybird/record-click.ts
+++ b/apps/web/lib/tinybird/record-click.ts
@@ -72,15 +72,19 @@ export async function recordClick({
}
const ua = userAgent(req);
- const isBot = detectBot(req);
- // don't record clicks from bots
- if (isBot) {
- console.log(`Click not recorded ❌ – Bot detected.`, {
- ua,
- isBot,
- });
- return null;
+ // only do bot checks for non deep link requests (link clicks/qr code scans)
+ if (trigger !== "deeplink") {
+ const isBot = detectBot(req);
+
+ // don't record clicks from bots
+ if (isBot) {
+ console.log(`Click not recorded ❌ – Bot detected.`, {
+ ua,
+ isBot,
+ });
+ return null;
+ }
}
const identityHash = await getIdentityHash(req);