The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add back skip_deeplink_preview
Steven Tey509133c40554
diff --git a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/action-buttons.tsx b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/action-buttons.tsxindex 2cfdf18070..5a53c47e27 100644--- a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/action-buttons.tsx+++ b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/action-buttons.tsx@@ -15,7 +15,7 @@ export function DeepLinkActionButtons({await copyToClipboard(link.shortLink);}- window.location.href = link.shortLink;+ window.location.href = `${link.shortLink}?skip_deeplink_preview=1`;};return (diff --git a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/brand-logo-badge.tsx b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/brand-logo-badge.tsxindex bc825536e8..c9d0993e2a 100644--- a/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/brand-logo-badge.tsx+++ b/apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key]/brand-logo-badge.tsx@@ -15,7 +15,7 @@ export function BrandLogoBadge({<buttononClick={async () => {await copyToClipboard(link.shortLink);- window.location.href = link.shortLink;+ window.location.href = `${link.shortLink}?skip_deeplink_preview=1`;}}className="inline-flex items-center gap-2 rounded-full bg-white px-3 py-1.5 shadow-lg shadow-black/10 ring-1 ring-neutral-200">diff --git a/apps/web/lib/middleware/link.ts b/apps/web/lib/middleware/link.tsindex f8ed5203db..d48ca2b020 100644--- a/apps/web/lib/middleware/link.ts+++ b/apps/web/lib/middleware/link.ts@@ -411,8 +411,12 @@ export default async function LinkMiddleware(}),);- // if it's an iOS app store URL, we need to show the interstitial page + cache deep link click data- if (isIosAppStoreUrl(ios)) {+ // if it's an iOS app store URL (and skip_deeplink_preview is not set)+ // we need to show the interstitial page + cache deep link click data+ if (+ isIosAppStoreUrl(ios) &&+ !req.nextUrl.searchParams.get("skip_deeplink_preview")+ ) {ev.waitUntil(cacheDeepLinkClickData({req,