Glossary/Metrics and growth
QR code deep link
Definition
A QR code deep link is a QR code encoding a universal or app link, so that scanning it opens the corresponding app directly on the intended content, or routes to the app store and restores that content after install.
The scan is the easy part. What makes a QR deep link work or fail is what is inside it: an HTTPS URL that the operating system can route to your app opens it instantly, while a custom URI scheme frequently does nothing at all in a camera app. That single encoding decision determines whether a printed code is a working channel or a dead rectangle.
Encode an HTTPS link, never a URI scheme
A QR code is just a container for a string. The camera apps that scan it are conservative about what they will open, and a custom scheme like myapp://product/42 is the case they handle worst — often silently, with no error and no prompt.
| Encoded value | App installed | App not installed | Verdict |
|---|---|---|---|
https://example.com/p/42 (universal link) | Opens the app on that product | Opens the web page, which can offer the app | Correct |
myapp://product/42 (URI scheme) | May open; often ignored by the camera | Nothing, or an error | Avoid |
| App Store URL | Opens the store, not the app | Opens the store | Loses context entirely |
| A redirecting short link over HTTPS | Opens the app if the final URL is associated | Web fallback, then store | Works; verify the association on the final domain |
The third row is the most common production mistake. A poster carrying a store link converts worse than one carrying a universal link, because every existing user is sent to a store page instead of into the app, and the specific product they scanned for is discarded.
Printed codes are permanent; the URL behind them should not be
Encode a short link you control and can re-point, not a deep path you may reorganise. A QR code on packaging outlives several site restructures, and the only thing standing between a reprint and a dead scan is a redirect you can edit.
The full scan-to-install journey
For a user who already has the app, the journey is one hop. For a new user it crosses the store boundary, which is where the scanned context is lost unless it is deliberately carried.
- The camera decodes an HTTPS URL and offers to open it.
- The OS checks the domain's association file — AASA on iOS, assetlinks.json on Android.
- If the app is installed and the path matches, the app opens directly on the content. Journey over.
- If not, the web fallback loads, which records a click with the destination and any campaign parameters.
- The fallback forwards to the store; on Android the payload rides the Play install referrer, on iOS nothing survives.
- At first open the app resolves the deferred link and navigates to the scanned content.
Step 3 is the one that fails silently for the wrong reason. If the path in your QR code is not covered by the patterns in your association file, the OS quietly loads the web page instead, and the code appears to work while doing something entirely different. Test the specific printed URL, not a representative one.
# Encode the exact URL that will be printed, campaign parameters and all.
URL="https://example.com/p/42?utm_source=poster&utm_campaign=spring&qr=st-14"
# Generate at a size that survives the print process.
qrencode -o poster-p42.png -s 12 -m 2 -l M "$URL"
# Follow every redirect and confirm where it lands.
curl -sSIL "$URL" | grep -Ei '^(HTTP/|location:)'
# Confirm the final host actually claims that path for the app.
curl -sS https://example.com/.well-known/apple-app-site-association | jq '.applinks.details'Error-correction level M recovers roughly 15% of a damaged code and is the sensible default for print. Higher levels tolerate more damage — worth it for outdoor placements — at the cost of a denser pattern that needs more physical space to stay scannable.
Attributing a physical scan
QR codes are one of the few ways to attribute an offline surface, because the encoded URL can carry parameters that no other physical channel supports. That only works if each placement gets its own value; one code reused everywhere destroys the information before it exists.
| Parameter | Example | Answers |
|---|---|---|
utm_source | poster, packaging, receipt | Which medium |
utm_campaign | spring-launch | Which campaign |
| A placement ID | qr=st-14 | Which physical location |
| A print run or version | v=2 | Which reprint, so old codes stay distinguishable |
| A product or content ID | In the path itself | What the user actually wanted |
Per-placement identifiers turn a print budget into a measurable channel: scans per placement, install rate per placement, and retention by placement are all computable from that one extra parameter. The UTM builder is the fastest way to produce them without hand-encoding mistakes, and an unencoded ampersand in a printed URL is not a bug you can fix after the reprint.
- Scans are not unique users. Test scans, curious repeat scans and screenshots all inflate the top of the funnel.
- Some scanner apps prefetch the URL, which registers a click with no human behind it — filter on user agent where you can.
- iOS deferred matching is probabilistic in the absence of any carried identifier; expect a gap between clicks and attributed installs, and see why installs are unattributed.
- Report scan → install and scan → app open separately. A poster near existing customers converts mostly to app opens, which is a success that an install-only report scores as zero.
Deep link debugger
A printed QR code cannot be edited after the fact, so the URL inside it has to be verified before the print run. Paste the exact encoded URL here to see whether it is claimed by your app on both platforms, and where in the redirect chain the association breaks if it is not.
Open the deep link debugger →Frequently asked questions
- What is a QR code deep link?
- It is a QR code that encodes a universal link or Android App Link rather than a plain web address, so scanning it opens your app directly on the intended screen. If the app is not installed, the encoded URL falls back to a web page that forwards to the store, and a deferred deep link restores the destination after installation.
- Should a QR code contain a URI scheme or an HTTPS link?
- Always an HTTPS link. Camera apps handle custom URI schemes inconsistently and often ignore them entirely with no visible error, whereas an HTTPS universal or app link is routed by the operating system to your app when it is installed and to your web page when it is not, which covers both audiences with one code.
- Can a QR code install the app and open the right screen?
- Yes, but not by itself. The scan opens a web fallback that records the destination and forwards to the store, and the app must resolve that pending destination at first launch through a deferred deep link. Without that final step the app opens on its home screen and the reason the user scanned is lost.
- How do I attribute installs from a printed QR code?
- Encode campaign parameters and a unique placement identifier in the URL, so each poster, package or receipt is distinguishable. On Android the parameters survive through the Play install referrer; on iOS they must be recovered by a deferred match at first open, which leaves a gap between recorded scans and attributed installs.
- Why does my QR code open the website instead of the app?
- Because the operating system did not consider that specific URL to be claimed by your app. The usual causes are a path not covered by the patterns in your association file, a redirect chain whose final host is not associated with the app, or a missing or unreachable AASA or assetlinks.json file on that domain.
Related terms
- Web-to-app conversion — Web-to-app conversion is the process of moving a mobile web visitor into a native app, ideally landing them on the same content they were viewing rather than on a generic home screen.
- Universal Link — A Universal Link is a standard HTTPS URL that opens an iOS app directly when that app is installed and the domain has authorised it, and loads the equivalent web page when it is not.
- Smart app banner — A smart app banner is a native promotional bar that Safari on iOS renders at the top of a web page when the page declares an `apple-itunes-app` meta tag, offering to open or install the associated app.
- Custom URI Scheme — A custom URI scheme is a non-standard URL protocol, such as myapp://, that an app registers with the operating system so that URLs beginning with it open that app.