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.

update record-fake-click

Pedro Ladeira6255a55a9c6a
diff --git a/apps/web/lib/tinybird/record-fake-click.ts b/apps/web/lib/tinybird/record-fake-click.ts
index 9c4a75bebe..7461969f92 100644
--- a/apps/web/lib/tinybird/record-fake-click.ts
+++ b/apps/web/lib/tinybird/record-fake-click.ts
@@ -19,9 +19,6 @@ function toSafeHeaderValue(value: string | null | undefined) {
return value;
}
-const DEFAULT_USER_AGENT =
- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)";
-
// TODO:
// Use this in other places where we need to record a fake click event (Eg: import-customers)
export async function recordFakeClick({
@@ -55,7 +52,8 @@ export async function recordFakeClick({
const dummyRequest = new Request(link.url, {
headers: new Headers({
- "user-agent": userAgent || DEFAULT_USER_AGENT,
+ "user-agent":
+ userAgent || "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
"x-forwarded-for": "127.0.0.1",
"x-vercel-ip-country": country,
"x-vercel-ip-country-region": toSafeHeaderValue(customer?.region) || "CA",