The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix default trackConversion
Steven Tey854af83cb4ff
diff --git a/apps/web/lib/middleware/link.ts b/apps/web/lib/middleware/link.tsindex 1bc3a35758..e633bdc11e 100644--- a/apps/web/lib/middleware/link.ts+++ b/apps/web/lib/middleware/link.ts@@ -80,7 +80,7 @@ export default async function LinkMiddleware(id: linkId,url,password,- trackConversion = true,+ trackConversion,proxy,rewrite,iframeable,diff --git a/apps/web/lib/zod/schemas/links.ts b/apps/web/lib/zod/schemas/links.tsindex 24572f3252..cc3bab1e0f 100644--- a/apps/web/lib/zod/schemas/links.ts+++ b/apps/web/lib/zod/schemas/links.ts@@ -149,6 +149,11 @@ export const createLinkBodySchema = z.object({.describe("The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.",),+ trackConversion: z+ .boolean()+ .optional()+ .default(false)+ .describe("Whether to track conversions for the short link."),archived: z.boolean().optional()@@ -266,6 +271,10 @@ export const LinkSchema = z"This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter.",),url: z.string().url().describe("The destination URL of the short link."),+ trackConversion: z+ .boolean()+ .default(false)+ .describe("Whether to track conversions for the short link."),archived: z.boolean().default(false)