Link Routing & Deep Link System
Replaced a third-party link-in-bio tool with a custom edge-native system — full analytics, deep linking, and real-time slug control.
Delivered in 2 weeks for a European agency. Due to the NDA, we cannot disclose the client name — but the feedback could not have been better.
UI Preview
A quick look at the product before we get into the technical breakdown.
| Slug | Platforms | Status | Clicks | ||
|---|---|---|---|---|---|
C /creator_05 vippt-br | InstagramYouTubeWebsite | Active | 18,450 | Copy link··· | |
C /creator_01 us | InstagramTikTok | Active | 14,823 | Copy link··· | |
C /creator_02 uklaunch | XWebsite | Active | 9,341 | Copy link··· | |
C /creator_03 | YouTube | Active | 6,702 | Copy link··· | |
C /creator_04 paused | No active links | Paused | 2,190 | Copy link··· |
The Problem
A marketing agency managing dozens of creators needed to swap link destinations instantly — no platform dependency, no 24h propagation delays, no per-link billing. The harder constraint: Instagram's in-app browser (WKWebView) blocks Universal Links entirely, making deep linking to native apps unreliable with off-the-shelf solutions.
The Solution
Built a stateless edge routing system on Cloudflare Workers + KV. Every slug resolves at the nearest edge node in under 5ms. Deep linking uses a timed JavaScript fallback pattern that survives WKWebView: attempts the native app URL scheme, waits 1000–1200ms for a visibilitychange signal, then redirects to the web fallback — bypassing the Instagram browser limitation entirely. A React admin panel lets non-technical operators manage all creators and toggle deep link behavior per-slug without any code deploy.
Engineering Highlights
WKWebView kills Universal Links
Instagram's in-app browser silently blocks Universal Links. The solution: skip Universal Links entirely and use URL schemes with a 1000–1200ms JavaScript timer. Below 800ms the app switch doesn't complete; above 1500ms the UX degrades. The sweet spot is 1000–1200ms with a visibilitychange listener to cancel the fallback if the app opens successfully.
Analytics that survive redirects
Standard fetch calls are killed mid-flight when the page navigates away. All PostHog events use navigator.sendBeacon() — fire-and-forget, survives page unload, no dropped events regardless of redirect speed.
Zero-downtime config changes
Cloudflare KV propagates globally in under 60s without any redeploy. The Worker reads config on every request, so a slug destination update goes live across all edge nodes within a minute of saving.
OS-aware routing without server overhead
iOS and Android require entirely different deep link strategies (URL scheme vs. Android Intent URL). The Worker branches on User-Agent at the edge — no client-side JS needed for the routing decision, keeping the HTML payload minimal.
Stack