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.

add temporary log

Steven Tey6a947e9bbbf1
diff --git a/apps/web/app/api/track/route.ts b/apps/web/app/api/track/route.ts
index bb3f590867..2d78e4d524 100644
--- a/apps/web/app/api/track/route.ts
+++ b/apps/web/app/api/track/route.ts
@@ -2,7 +2,7 @@ import { parseRequestBody } from "@/lib/api/utils";
import { withSessionEdge } from "@/lib/auth/session-edge";
import { getClickEvent, recordConversion } from "@/lib/tinybird";
import { conversionRequestSchema } from "@/lib/zod/schemas/conversions";
-import { nanoid } from "@dub/utils";
+import { log, nanoid } from "@dub/utils";
import { waitUntil } from "@vercel/functions";
import { NextResponse } from "next/server";
@@ -30,6 +30,12 @@ export const POST = withSessionEdge(async ({ req }) => {
customer_id: customerId,
metadata,
});
+
+ // TODO: Remove this before launch
+ await log({
+ message: `*Conversion event recorded*: Customer *${customerId}* converted on click *${clickId}* with event *${eventName}*.`,
+ type: "alerts",
+ });
})(),
);