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 track-lead.ts

Steven Tey866d95515d1b
diff --git a/apps/web/lib/auth/track-lead.ts b/apps/web/lib/auth/track-lead.ts
index 4299007a75..9e9d97cb9f 100644
--- a/apps/web/lib/auth/track-lead.ts
+++ b/apps/web/lib/auth/track-lead.ts
@@ -3,16 +3,16 @@ import { User } from "next-auth";
import { cookies } from "next/headers";
export const trackLead = async (user: User) => {
- const dubId = cookies().get("dub_id")?.value;
+ const clickId = cookies().get("dub_id")?.value;
- if (!dubId) {
+ if (!clickId) {
console.log("No dub_id cookie found, skipping lead tracking...");
return;
}
// send the lead event to Dub
await dub.track.lead({
- clickId: dubId,
+ clickId,
eventName: "Sign Up",
externalId: user.id,
customerName: user.name,