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.

Avoid logging metatag generation for default URL

Steven Teyd94f385b190b
diff --git a/lib/upstash.ts b/lib/upstash.ts
index 433960eb6a..d412b694fe 100644
--- a/lib/upstash.ts
+++ b/lib/upstash.ts
@@ -80,9 +80,14 @@ export async function recordClick(
* If there's an error, it will be logged to a separate redis list for debugging
**/
export async function recordMetatags(url: string, error: boolean) {
- return await redis.lpush(error ? "metatags-errors" : "metatags", {
- url,
- });
+ if (url === "https://github.com/steven-tey/dub") {
+ // ignore metatag generation for default URL
+ return null;
+ } else {
+ return await redis.lpush(error ? "metatags-errors" : "metatags", {
+ url,
+ });
+ }
}
export async function getLinkClicksCount(domain: string, key: string) {