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.

final changes – add conversion script checker

Steven Tey906e6fbdeea2
diff --git a/apps/web/app/api/links/check-conversion-script/route.ts b/apps/web/app/api/links/check-conversion-script/route.ts
new file mode 100644
index 0000000000..dc92a2c2a7
--- /dev/null
+++ b/apps/web/app/api/links/check-conversion-script/route.ts
@@ -0,0 +1,40 @@
+import { handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { ratelimitOrThrow } from "@/lib/api/utils";
+import { getUrlQuerySchema } from "@/lib/zod/schemas/links";
+import { fetchWithTimeout } from "@dub/utils";
+import { NextRequest, NextResponse } from "next/server";
+
+// ping URL to see if the dubcdn.com/analytics/script.js script is installed
+const checkFunction = async (url: string) => {
+ const res = await fetchWithTimeout(url, {
+ headers: {
+ "User-Agent": "Dub.co Bot",
+ },
+ });
+
+ if (res.status !== 200) {
+ throw new Error(`Failed to fetch ${url}`);
+ }
+
+ const html = await res.text();
+ const isInstalled = html.includes("dubcdn.com/analytics/script.js");
+ return isInstalled;
+};
+
+export const runtime = "edge";
+
+export async function GET(req: NextRequest) {
+ try {
+ const { url } = getUrlQuerySchema.parse({
+ url: req.nextUrl.searchParams.get("url"),
+ });
+
+ await ratelimitOrThrow(req, "check-conversion-script");
+
+ const installed = await checkFunction(url);
+
+ return NextResponse.json({ installed });
+ } catch (error) {
+ return handleAndReturnErrorResponse(error);
+ }
+}
diff --git a/apps/web/app/api/links/iframeable/route.ts b/apps/web/app/api/links/iframeable/route.ts
index 05d24351c0..b8af497683 100644
--- a/apps/web/app/api/links/iframeable/route.ts
+++ b/apps/web/app/api/links/iframeable/route.ts
@@ -1,12 +1,10 @@
-import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
-import { ratelimit } from "@/lib/upstash";
+import { handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { ratelimitOrThrow } from "@/lib/api/utils";
import {
getDomainQuerySchema,
getUrlQuerySchema,
} from "@/lib/zod/schemas/links";
import { isIframeable } from "@dub/utils";
-import { ipAddress } from "@vercel/edge";
-import { getToken } from "next-auth/jwt";
import { NextRequest, NextResponse } from "next/server";
export const runtime = "edge";
@@ -18,21 +16,7 @@ export async function GET(req: NextRequest) {
domain: req.nextUrl.searchParams.get("domain"),
});
- // Rate limit if user is not logged in
- const session = await getToken({
- req,
- secret: process.env.NEXTAUTH_SECRET,
- });
- if (!session?.email) {
- const ip = ipAddress(req);
- const { success } = await ratelimit().limit(`iframeable:${ip}`);
- if (!success) {
- throw new DubApiError({
- code: "rate_limit_exceeded",
- message: "Don't DDoS me pls 🥺",
- });
- }
- }
+ await ratelimitOrThrow(req, "iframeable");
const iframeable = await isIframeable({ url, requestDomain: domain });
diff --git a/apps/web/app/api/links/random/route.ts b/apps/web/app/api/links/random/route.ts
index 760d3f96be..2cfd84d2cd 100644
--- a/apps/web/app/api/links/random/route.ts
+++ b/apps/web/app/api/links/random/route.ts
@@ -1,10 +1,8 @@
-import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { ratelimitOrThrow } from "@/lib/api/utils";
import { getRandomKey } from "@/lib/planetscale";
-import { ratelimit } from "@/lib/upstash";
import { domainKeySchema } from "@/lib/zod/schemas/links";
import { getSearchParams } from "@dub/utils";
-import { ipAddress } from "@vercel/edge";
-import { getToken } from "next-auth/jwt";
import { NextRequest, NextResponse } from "next/server";
export const runtime = "edge";
@@ -17,21 +15,7 @@ export const GET = async (req: NextRequest) => {
.pick({ domain: true })
.parse(searchParams);
- // Rate limit if user is not logged in
- const session = await getToken({
- req,
- secret: process.env.NEXTAUTH_SECRET,
- });
- if (!session?.email) {
- const ip = ipAddress(req);
- const { success } = await ratelimit().limit(`links-random:${ip}`);
- if (!success) {
- throw new DubApiError({
- code: "rate_limit_exceeded",
- message: "Don't DDoS me pls 🥺",
- });
- }
- }
+ await ratelimitOrThrow(req, "links-random");
const response = await getRandomKey({
domain,
diff --git a/apps/web/app/api/metatags/route.ts b/apps/web/app/api/metatags/route.ts
index e9b4f37c41..51aba9eadf 100644
--- a/apps/web/app/api/metatags/route.ts
+++ b/apps/web/app/api/metatags/route.ts
@@ -1,8 +1,6 @@
-import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
-import { ratelimit } from "@/lib/upstash";
+import { handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { ratelimitOrThrow } from "@/lib/api/utils";
import { getUrlQuerySchema } from "@/lib/zod/schemas/links";
-import { ipAddress } from "@vercel/edge";
-import { getToken } from "next-auth/jwt";
import { NextRequest, NextResponse } from "next/server";
import { getMetaTags } from "./utils";
@@ -14,21 +12,7 @@ export async function GET(req: NextRequest) {
url: req.nextUrl.searchParams.get("url"),
});
- // Rate limit if user is not logged in
- const session = await getToken({
- req,
- secret: process.env.NEXTAUTH_SECRET,
- });
- if (!session?.email) {
- const ip = ipAddress(req);
- const { success } = await ratelimit().limit(`metatags:${ip}`);
- if (!success) {
- throw new DubApiError({
- code: "rate_limit_exceeded",
- message: "Don't DDoS me pls 🥺",
- });
- }
- }
+ await ratelimitOrThrow(req, "metatags");
const metatags = await getMetaTags(url);
return NextResponse.json(metatags, {
diff --git a/apps/web/app/api/providers/route.ts b/apps/web/app/api/providers/route.ts
index 24983047ff..f96d110aea 100644
--- a/apps/web/app/api/providers/route.ts
+++ b/apps/web/app/api/providers/route.ts
@@ -1,9 +1,7 @@
import { handleAndReturnErrorResponse } from "@/lib/api/errors";
-import { ratelimit } from "@/lib/upstash";
+import { ratelimitOrThrow } from "@/lib/api/utils";
import { getUrlQuerySchema } from "@/lib/zod/schemas/links";
import { fetchWithTimeout } from "@dub/utils";
-import { ipAddress } from "@vercel/edge";
-import { getToken } from "next-auth/jwt";
import { NextRequest, NextResponse } from "next/server";
export const runtime = "edge";
@@ -14,18 +12,7 @@ export async function GET(req: NextRequest) {
url: req.nextUrl.searchParams.get("url"),
});
- // Rate limit if user is not logged in
- const session = await getToken({
- req,
- secret: process.env.NEXTAUTH_SECRET,
- });
- if (!session?.email) {
- const ip = ipAddress(req);
- const { success } = await ratelimit().limit(`providers:${ip}`);
- if (!success) {
- return new Response("Don't DDoS me pls 🥺", { status: 429 });
- }
- }
+ await ratelimitOrThrow(req, "providers");
const urlObject = new URL(url);
diff --git a/apps/web/app/api/qr/route.tsx b/apps/web/app/api/qr/route.tsx
index 2d31f26fbb..37138df19f 100644
--- a/apps/web/app/api/qr/route.tsx
+++ b/apps/web/app/api/qr/route.tsx
@@ -1,10 +1,8 @@
-import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { ratelimitOrThrow } from "@/lib/api/utils";
import { QRCodeSVG } from "@/lib/qr/utils";
-import { ratelimit } from "@/lib/upstash";
import { getQRCodeQuerySchema } from "@/lib/zod/schemas/qr";
import { getSearchParams } from "@dub/utils";
-import { ipAddress } from "@vercel/edge";
-import { getToken } from "next-auth/jwt";
import { ImageResponse } from "next/og";
import { NextRequest } from "next/server";
@@ -12,21 +10,7 @@ export const runtime = "edge";
export async function GET(req: NextRequest) {
try {
- // Rate limit if user is not logged in
- const session = await getToken({
- req,
- secret: process.env.NEXTAUTH_SECRET,
- });
- if (!session?.email) {
- const ip = ipAddress(req);
- const { success } = await ratelimit().limit(`qr:${ip}`);
- if (!success) {
- throw new DubApiError({
- code: "rate_limit_exceeded",
- message: "Don't DDoS me pls 🥺",
- });
- }
- }
+ await ratelimitOrThrow(req, "qr");
const params = getSearchParams(req.url);
const { url, size, level, fgColor, bgColor, includeMargin } =
diff --git a/apps/web/lib/api/links/process-link.ts b/apps/web/lib/api/links/process-link.ts
index d0bd03e9c7..3c43c4cc7c 100644
--- a/apps/web/lib/api/links/process-link.ts
+++ b/apps/web/lib/api/links/process-link.ts
@@ -48,6 +48,7 @@ export async function processLink<T extends Record<string, any>>({
url,
image,
proxy,
+ trackConversion,
password,
rewrite,
expiredUrl,
@@ -185,6 +186,14 @@ export async function processLink<T extends Record<string, any>>({
}
}
+ if (trackConversion && !workspace?.betaTester) {
+ return {
+ link: payload,
+ error: "Conversion tracking is only available for beta testers.",
+ code: "forbidden",
+ };
+ }
+
if (bulk) {
if (image) {
return {
diff --git a/apps/web/lib/api/utils.ts b/apps/web/lib/api/utils.ts
index ed8f6af8ff..be70554646 100644
--- a/apps/web/lib/api/utils.ts
+++ b/apps/web/lib/api/utils.ts
@@ -1,3 +1,7 @@
+import { ipAddress } from "@vercel/edge";
+import { getToken } from "next-auth/jwt";
+import { NextRequest } from "next/server";
+import { ratelimit } from "../upstash";
import { DubApiError } from "./errors";
// TODO:
@@ -13,3 +17,26 @@ export const parseRequestBody = async (req: Request) => {
});
}
};
+
+export const ratelimitOrThrow = async (
+ req: NextRequest,
+ identifier?: string,
+) => {
+ // Rate limit if user is not logged in
+ const session = await getToken({
+ req,
+ secret: process.env.NEXTAUTH_SECRET,
+ });
+ if (!session?.email) {
+ const ip = ipAddress(req);
+ const { success } = await ratelimit().limit(
+ `${identifier || "ratelimit"}:${ip}`,
+ );
+ if (!success) {
+ throw new DubApiError({
+ code: "rate_limit_exceeded",
+ message: "Don't DDoS me pls 🥺",
+ });
+ }
+ }
+};
diff --git a/apps/web/ui/links/link-card.tsx b/apps/web/ui/links/link-card.tsx
index bf9155822b..340927a35b 100644
--- a/apps/web/ui/links/link-card.tsx
+++ b/apps/web/ui/links/link-card.tsx
@@ -52,7 +52,6 @@ import { useParams, useSearchParams } from "next/navigation";
import { useEffect, useMemo, useRef, useState } from "react";
import { toast } from "sonner";
import useSWR, { mutate } from "swr";
-import { useConvertLinkModal } from "../modals/convert-link-modal";
import { useTransferLinkModal } from "../modals/transfer-link-modal";
import LinkLogo from "./link-logo";
@@ -165,9 +164,6 @@ export default function LinkCard({
const expired = expiresAt && new Date(expiresAt) < new Date();
- const { setShowConvertLinkModal, ConvertLinkModal } = useConvertLinkModal({
- props,
- });
const { setShowArchiveLinkModal, ArchiveLinkModal } = useArchiveLinkModal({
props,
});
@@ -246,9 +242,6 @@ export default function LinkCard({
case "q":
setShowLinkQRModal(true);
break;
- case "c":
- setShowConvertLinkModal(true);
- break;
case "a":
setShowArchiveLinkModal(true);
break;
@@ -286,7 +279,6 @@ export default function LinkCard({
<LinkQRModal />
<AddEditLinkModal />
<DuplicateLinkModal />
- <ConvertLinkModal />
<ArchiveLinkModal />
<TransferLinkModal />
<DeleteLinkModal />
@@ -566,19 +558,7 @@ export default function LinkCard({
className="h-9 px-2 font-medium"
/>
</div>
- <div className="grid border-y border-gray-200 p-2">
- <Button
- text="Conversions"
- variant="outline"
- onClick={() => {
- setOpenPopover(false);
- setShowConvertLinkModal(true);
- }}
- icon={<Magic className="h-4 w-4" />}
- shortcut="C"
- className="h-9 px-2 font-medium"
- />
- </div>
+ <div className="border-t border-gray-200" />
<div className="grid gap-px p-2">
<Button
text={archived ? "Unarchive" : "Archive"}
diff --git a/apps/web/ui/modals/add-edit-link-modal/conversion-section.tsx b/apps/web/ui/modals/add-edit-link-modal/conversion-section.tsx
new file mode 100644
index 0000000000..7a40320f9a
--- /dev/null
+++ b/apps/web/ui/modals/add-edit-link-modal/conversion-section.tsx
@@ -0,0 +1,125 @@
+import { LinkProps } from "@/lib/types";
+import { AlertCircleFill, CheckCircleFill } from "@/ui/shared/icons";
+import { ProBadgeTooltip } from "@/ui/shared/pro-badge-tooltip";
+import { LoadingSpinner, SimpleTooltipContent, Switch } from "@dub/ui";
+import {
+ FADE_IN_ANIMATION_SETTINGS,
+ fetcher,
+ getUrlFromString,
+} from "@dub/utils";
+import { motion } from "framer-motion";
+import { Dispatch, SetStateAction, useEffect, useState } from "react";
+import useSWR from "swr";
+
+export default function ConversionSection({
+ data,
+ setData,
+}: {
+ data: LinkProps;
+ setData: Dispatch<SetStateAction<LinkProps>>;
+}) {
+ const { trackConversion } = data;
+ const [enabled, setEnabled] = useState(trackConversion);
+ useEffect(() => {
+ if (enabled) {
+ // if enabling, set trackConversion to true
+ setData({
+ ...data,
+ trackConversion: true,
+ });
+ } else {
+ // if disabling, set trackConversion to false
+ setData({ ...data, trackConversion: false });
+ }
+ }, [enabled]);
+
+ return (
+ <div className="relative border-b border-gray-200 pb-5">
+ <div className="flex items-center justify-between">
+ <div className="flex items-center justify-between space-x-2">
+ <h2 className="text-sm font-medium text-gray-900">
+ Conversion Tracking
+ </h2>
+ <ProBadgeTooltip
+ content={
+ <SimpleTooltipContent
+ title="Track conversions on your short link to measure the effectiveness of your marketing campaigns."
+ cta="Learn more."
+ href="https://dub.co/help/article/conversion-tracking"
+ />
+ }
+ />
+ </div>
+ <Switch fn={() => setEnabled(!enabled)} checked={enabled} />
+ </div>
+
+ {enabled && (
+ <motion.div className="mt-3" {...FADE_IN_ANIMATION_SETTINGS}>
+ <CheckConversionScript url={getUrlFromString(data.url)} />
+ </motion.div>
+ )}
+ </div>
+ );
+}
+
+function CheckConversionScript({ url }: { url: string }) {
+ const { data, isLoading } = useSWR<{ installed: boolean }>(
+ `/api/links/check-conversion-script?url=${url}`,
+ fetcher,
+ );
+
+ return (
+ <div className="flex items-start space-x-2 rounded-md border border-gray-300 bg-white p-3">
+ <div className="flex-none">
+ {isLoading ? (
+ <LoadingSpinner className="h-5 w-5" />
+ ) : data?.installed ? (
+ <CheckCircleFill className="h-5 w-5 text-green-500" />
+ ) : (
+ <AlertCircleFill className="h-5 w-5 text-yellow-500" />
+ )}
+ </div>
+ <div className="flex flex-col space-y-0.5">
+ <p className="text-sm font-medium text-gray-700">
+ {!data || isLoading
+ ? "Checking if conversion script is installed..."
+ : data.installed
+ ? "Conversion Script is installed"
+ : "Conversion Script not detected"}
+ </p>
+ {data &&
+ (data.installed ? (
+ <p className="text-sm text-gray-600">
+ We will track conversions on this link.{" "}
+ <a
+ href="https://dub.co/help/article/conversion-tracking"
+ target="_blank"
+ className="text-gray-500 underline underline-offset-2 hover:text-gray-700"
+ >
+ Learn more.
+ </a>
+ </p>
+ ) : (
+ <p className="text-sm text-gray-600">
+ We recommend adding the{" "}
+ <a
+ href="https://github.com/dubinc/analytics"
+ target="_blank"
+ className="font-mono text-gray-500 underline underline-offset-2 hover:text-gray-700"
+ >
+ @dub/analytics
+ </a>{" "}
+ script for reliable conversion tracking.{" "}
+ <a
+ href="https://dub.co/help/article/conversion-tracking"
+ target="_blank"
+ className="text-gray-500 underline underline-offset-2 hover:text-gray-700"
+ >
+ Learn more.
+ </a>
+ </p>
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/apps/web/ui/modals/add-edit-link-modal/index.tsx b/apps/web/ui/modals/add-edit-link-modal/index.tsx
index 85d5382a20..6b845caf5d 100644
--- a/apps/web/ui/modals/add-edit-link-modal/index.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal/index.tsx
@@ -56,6 +56,7 @@ import { useDebounce, useDebouncedCallback } from "use-debounce";
import AndroidSection from "./android-section";
import CloakingSection from "./cloaking-section";
import CommentsSection from "./comments-section";
+import ConversionSection from "./conversion-section";
import ExpirationSection from "./expiration-section";
import GeoSection from "./geo-section";
import IOSSection from "./ios-section";
@@ -87,6 +88,7 @@ function AddEditLinkModal({
aiUsage,
aiLimit,
mutate: mutateWorkspace,
+ betaTester,
} = useWorkspace();
const [keyError, setKeyError] = useState<string | null>(null);
@@ -716,18 +718,19 @@ function AddEditLinkModal({
<div className="grid gap-5 px-4 md:px-16">
<TagsSection {...{ props, data, setData }} />
- <CommentsSection {...{ props, data, setData }} />
- <UTMSection {...{ props, data, setData }} />
+ {betaTester && <ConversionSection {...{ data, setData }} />}
<OGSection
{...{ props, data, setData }}
generatingMetatags={generatingMetatags}
/>
+ <UTMSection {...{ props, data, setData }} />
<CloakingSection {...{ data, setData }} />
<PasswordSection {...{ props, data, setData }} />
<ExpirationSection {...{ props, data, setData }} />
<IOSSection {...{ props, data, setData }} />
<AndroidSection {...{ props, data, setData }} />
<GeoSection {...{ props, data, setData }} />
+ <CommentsSection {...{ props, data, setData }} />
</div>
<div
diff --git a/apps/web/ui/modals/convert-link-modal.tsx b/apps/web/ui/modals/convert-link-modal.tsx
deleted file mode 100644
index 03a1d63cfb..0000000000
--- a/apps/web/ui/modals/convert-link-modal.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import useWorkspace from "@/lib/swr/use-workspace";
-import { LinkProps } from "@/lib/types";
-import { Button, Modal, useToastWithUndo } from "@dub/ui";
-import { getApexDomain, linkConstructor } from "@dub/utils";
-import {
- Dispatch,
- MouseEvent,
- SetStateAction,
- useCallback,
- useMemo,
- useState,
-} from "react";
-import { toast } from "sonner";
-import { mutate } from "swr";
-import LinkLogo from "../links/link-logo";
-
-const sendConvertRequest = ({
- linkId,
- trackConversion,
- workspaceId,
-}: {
- linkId: string;
- trackConversion: boolean;
- workspaceId?: string;
-}) => {
- return fetch(`/api/links/${linkId}?workspaceId=${workspaceId}`, {
- method: "PATCH",
- body: JSON.stringify({ trackConversion }),
- headers: {
- "Content-Type": "application/json",
- },
- });
-};
-
-const revalidateLinks = () => {
- return mutate(
- (key) => typeof key === "string" && key.startsWith("/api/links"),
- undefined,
- { revalidate: true },
- );
-};
-
-function ConvertLinkModal({
- showConvertLinkModal,
- setShowConvertLinkModal,
- props,
-}: {
- showConvertLinkModal: boolean;
- setShowConvertLinkModal: Dispatch<SetStateAction<boolean>>;
- props: LinkProps;
-}) {
- const toastWithUndo = useToastWithUndo();
-
- const { id: workspaceId } = useWorkspace();
- const [archiving, setArchiving] = useState(false);
- const apexDomain = getApexDomain(props.url);
-
- const { key, domain } = props;
-
- const shortlink = useMemo(() => {
- return linkConstructor({
- key,
- domain,
- pretty: true,
- });
- }, [key, domain]);
-
- const handleConvertRequest = async (event: MouseEvent<HTMLButtonElement>) => {
- event.preventDefault();
-
- setArchiving(true);
- const res = await sendConvertRequest({
- linkId: props.id,
- trackConversion: !props.trackConversion,
- workspaceId,
- });
- setArchiving(false);
-
- if (!res.ok) {
- const { error } = await res.json();
- toast.error(error.message);
- return;
- }
-
- revalidateLinks();
- setShowConvertLinkModal(false);
- toastWithUndo({
- id: "undo-convert-link-toast",
- message: `Successfully ${props.trackConversion ? "disabled" : "enable"} conversion tracking for link!`,
- undo: undoAction,
- duration: 5000,
- });
- };
-
- const undoAction = () => {
- toast.promise(
- sendConvertRequest({
- linkId: props.id,
- trackConversion: props.trackConversion,
- workspaceId,
- }),
- {
- loading: "Undo in progress...",
- error: "Failed to roll back changes. An error occurred.",
- success: () => {
- revalidateLinks();
- return "Undo successful! Changes reverted.";
- },
- },
- );
- };
-
- return (
- <Modal
- showModal={showConvertLinkModal}
- setShowModal={setShowConvertLinkModal}
- >
- <div className="flex flex-col items-center justify-center space-y-3 border-b border-gray-200 px-4 py-4 pt-8 text-center sm:px-16">
- <LinkLogo apexDomain={apexDomain} />
- <h3 className="text-lg font-medium">
- {props.trackConversion ? "Disable" : "Enable"} Conversion Tracking
- </h3>
- <p className="text-sm text-gray-500">
- {props.trackConversion
- ? "By disabling conversion tracking, you will no longer be able to track link conversions."
- : "By enabling conversion tracking, you will be able to track link conversions."}
- </p>
- </div>
-
- <div className="flex flex-col space-y-6 bg-gray-50 px-4 py-8 text-left sm:px-16">
- <Button
- onClick={handleConvertRequest}
- autoFocus
- loading={archiving}
- text={`Confirm ${props.trackConversion ? "Disable" : "Enable"}`}
- />
- </div>
- </Modal>
- );
-}
-
-export function useConvertLinkModal({ props }: { props: LinkProps }) {
- const [showConvertLinkModal, setShowConvertLinkModal] = useState(false);
-
- const ConvertLinkModalCallback = useCallback(() => {
- return props ? (
- <ConvertLinkModal
- showConvertLinkModal={showConvertLinkModal}
- setShowConvertLinkModal={setShowConvertLinkModal}
- props={props}
- />
- ) : null;
- }, [showConvertLinkModal, setShowConvertLinkModal]);
-
- return useMemo(
- () => ({
- setShowConvertLinkModal,
- ConvertLinkModal: ConvertLinkModalCallback,
- }),
- [setShowConvertLinkModal, ConvertLinkModalCallback],
- );
-}
diff --git a/packages/utils/src/constants/misc.ts b/packages/utils/src/constants/misc.ts
index bd4a8febc0..6c85ac6a94 100644
--- a/packages/utils/src/constants/misc.ts
+++ b/packages/utils/src/constants/misc.ts
@@ -9,6 +9,7 @@ export const DEFAULT_LINK_PROPS: any = {
title: null,
description: null,
image: null,
+ trackConversion: false,
rewrite: false,
ios: null,
android: null,