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 options.ts

Steven Tey83761443a619
diff --git a/apps/web/lib/auth/options.ts b/apps/web/lib/auth/options.ts
index 403d12a36c..2f35d10b85 100644
--- a/apps/web/lib/auth/options.ts
+++ b/apps/web/lib/auth/options.ts
@@ -456,20 +456,16 @@ export const authOptions: NextAuthOptions = {
const clickId = cookies().get("dclid")?.value;
if (clickId) {
// send lead event to Dub
- try {
- waitUntil(
- dub.track.lead({
- clickId,
- eventName: "Sign Up",
- customerId: user.id,
- customerName: user.name,
- customerEmail: user.email,
- customerAvatar: user.image,
- }),
- );
- } catch (error) {
- console.error("Error sending lead event to Dub", error);
- }
+ waitUntil(
+ dub.track.lead({
+ clickId,
+ eventName: "Sign Up",
+ customerId: user.id,
+ customerName: user.name,
+ customerEmail: user.email,
+ customerAvatar: user.image,
+ }),
+ );
// delete the clickId cookie
cookies().delete("dclid");
}