How AppLinks work
How a CodeOnAir AppLink works: one link followed from the tap through previews, the store install and deferred deep linking to the right screen.
Deep links sound simple — “open this screen” — until the app isn't installed, the link is opened inside Instagram, or it's shared in WhatsApp. This page follows one link through all of that, so you know what your users see and why.
The example#
Your app is ShopKart. Asha wants to invite her friend Ravi, who gets ₹100 off his first order. The app creates a link for her: https://shopkart.codeonair.com/invite-asha, with the deep link URL https://shopkart.in/invite?code=ASHA100. Asha sends it to Ravi on WhatsApp.
1. The preview#
Before Ravi taps anything, WhatsApp fetches the link to draw a preview. CodeOnAir recognises preview bots and answers with the link's title, description and image. If you didn't set them, they come from the page the deep link points to (shopkart.in/invite), then from your website's home page, then your site's icon. Bot visits are never counted as clicks.
2. The tap#
Ravi taps the link. What happens next depends on his phone:
| Ravi's situation | What he sees |
|---|---|
| ShopKart is installed | The phone opens ShopKart straight away — Android App Links and iOS Universal Links skip the browser. |
| Not installed, Android | The Play Store page for ShopKart. The click id is tucked into the store link. |
| Not installed, iPhone | The App Store page, after a page that notes a few anonymous signals about the tap. |
| On a laptop | The deep link URL, shopkart.in/invite?code=ASHA100, in the browser. |
| Inside Instagram's browser | A small page with Open in app and Get the app — these browsers don't let links open apps by themselves. |
Every real tap is recorded as a click — with the platform, country and a hashed IP, never the raw address. That's what you see in analytics, and what makes the next step possible.
3. Ravi installs and opens the app#
This is the part normal links can't do. The store sat between the tap and the app, so the app starts with no idea which link brought Ravi. On the first launch the SDK asks CodeOnAir: “is there a recent click that matches this phone?”
On Android
The Play Store hands the app the install referrer — the click id from the link. The match is exact: this install came from Asha's link.
On iPhone
Apple doesn't pass anything through the App Store, so the match uses signals from the tap and the first launch: hashed IP address, iOS version, screen size, language and time zone. A match needs them to agree, within the link's attribution window. With clipboard matching turned on, the link page copies a one-time token and the app reads it — exact, at the cost of iOS asking Ravi to allow pasting.
Either way, the SDK calls your onLink handler with path: "/invite", params: { code: "ASHA100" } and isDeferred: true. Your app opens the invite screen with the code filled in — exactly as if ShopKart had been installed all along.
4. The attribution window#
The window is how long after a click an install still counts for that link. With the default of 1 hour, if Ravi installs the app the next morning, the install isn't credited to Asha's link and the app opens normally. Referral programmes often use 24 hours to 7 days; ad campaigns prefer shorter windows so credit is stricter. You set it per link.
5. What you see afterwards#
In the link's analytics: one click (Android, India), one install credited to the link, and later opens each time Ravi taps it again with the app installed. If you use webhooks, your server receives app.install with the link and Asha's code, so you can give both of them their reward.
Why the setup steps matter#
Each setup step makes one part of this story work. Skip one, and that part quietly falls back to the browser:
| Setup step | Without it |
|---|---|
| Associated Domains (iOS) / intent filter (Android) | Taps open the browser instead of the app. |
| Team ID + Bundle ID, package + SHA-256 | Phones can't verify that your app owns the domain, so they won't open it. |
| The SDK and DeepLink.init() | The app opens, but no screen is chosen and installs aren't matched. |
| A URI scheme | Instagram and Facebook browsers can only offer Get the app on iOS. |
| Website URL | Desktop visitors and previews have nowhere good to go. |