The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
revert cachedClickId implementation
Steven Teyef4957bbad39
diff --git a/apps/web/lib/tinybird/record-click.ts b/apps/web/lib/tinybird/record-click.tsindex c08e7137e2..3767c76431 100644--- a/apps/web/lib/tinybird/record-click.ts+++ b/apps/web/lib/tinybird/record-click.ts@@ -62,11 +62,8 @@ export async function recordClick({if (!skipRatelimit) {// by default, we deduplicate clicks from the same IP address + link ID – only record 1 click per hour// here, we check if the clickId is cached in Redis within the last hour- // if it is, and it's the same as the one that's passed in, then we skip recording the click- // we need to do this to make it work with both server-side and client-side click tracking- // @see: https://dub.co/docs/conversions/clicks/introductionconst cachedClickId = await redis.get<string>(cacheKey);- if (cachedClickId && cachedClickId === clickId) {+ if (cachedClickId) {return null;}}