Deep links
A deep link is a link that opens the mobile app straight on the right screen: a
product card, a catalogue section, a static page. It looks like an ordinary link,
except that instead of https:// it starts with your app's scheme.
myshop://catalog/element/123
Deep links are for the cases where somebody reaches the app from outside: from a website, an email, an SMS, a QR code or a social media post.
When to use them
There are three different tools for opening a screen. Pick by where the person taps:
| Where they tap | The tool |
|---|---|
| A link outside the app: website, email, SMS, QR | A deep link (this article) |
| A push notification | Push tap actions |
| Content inside the app: a banner, a button, a product description | Interactive HTML blocks |
Your app's scheme
The scheme is unique to each shop and matches the app code: if the code is
myshop, every link starts with myshop://. If you do not know the code, ask
support.
Every example below uses myshop://: substitute your own scheme.
Address reference
| Address | What it opens |
|---|---|
home |
The home screen |
catalog |
The catalogue, the list of sections |
catalog/section/<section id> |
The product list of a section |
catalog/element/<product id> |
A product card |
content/static/<page id> |
A static page |
content/news/list/<category id> |
The post list of a category |
content/news/detail/<category id>/<post id> |
A post |
profile/orders/list |
The shopper's order list |
There are no other addresses. The basket, stores, the loyalty card and search cannot be opened with a deep link: use commands in a push or in HTML blocks for those.
Where to find identifiers
An identifier is visible in the admin panel address bar when an item card is open.
| What you need | Where to look | What to substitute |
|---|---|---|
| Catalogue section |
/categories/item/12 |
12 |
| Product |
/products/item/123 |
123 |
| Static page |
/content/pages/item/5 |
static_page_5 |
| Post category |
/content/categories/item/3 |
news_3 |
| Post |
/content/item/456 |
456 |
For pages and post categories the type is prefixed to the number:
static_page_5, news_3. That is not a typo: this is how the app tells content
screens apart.
myshop://content/static/static_page_5
myshop://content/news/list/news_3
myshop://content/news/detail/news_3/456
If the app data comes from 1C-Bitrix, the content screen identifiers are plain
numbers (content/static/100). Check them with your integrator.
Examples
A link on a website
<a href="myshop://catalog/element/123">Open the product in the app</a>
Replace 123 with your product identifier.
A button with a fallback
If the app is not installed, the link simply does nothing. To send such a visitor to a download page, add a fallback:
<a href="myshop://catalog/element/123" id="open-app">Open in the app</a>
<script>
document.getElementById('open-app').addEventListener('click', function (event) {
event.preventDefault();
var opened = false;
document.addEventListener('visibilitychange', function () {
if (document.hidden) opened = true;
});
window.location.href = 'myshop://catalog/element/123';
setTimeout(function () {
if (!opened) window.location.href = 'https://example.com/app';
}, 1200);
});
</script>
Replace https://example.com/app with your own page carrying the App Store and
Google Play links. This is a heuristic: the browser does not report whether the
app opened, so the transition is inferred from whether the tab went into the
background.
A QR code
Encode the whole address into the QR code:
myshop://catalog/section/12
Such a code is convenient to print in a shop window or on a flyer: the phone camera opens the catalogue section straight in the app.
Email and SMS
Insert the address as plain text:
Your order is ready: myshop://profile/orders/list
Not every mail client and messenger makes such links tappable. If reach matters, point people at a website page with the button from the example above.
Analytics tags
Parameters can be appended to the address: the app opens the same screen and ignores the extras.
myshop://catalog/element/123?utm_source=email&utm_campaign=sale
How to test
Open the link on a phone with the app installed: paste it into the browser address bar, into a note or into a chat with yourself and tap it. The app opens on the right screen, whether it was closed or merely in the background.
Limits
- The app must be installed. Without it nothing happens: the browser shows an error or ignores the link.
- The app does not intercept ordinary
https://addresses. A link must start with the app scheme. - An unknown address does not break the app: it simply opens on the screen it was on.
- A webview screen (a page showing an external site) cannot be opened with a deep link.
- The order list opens empty for a shopper who is not signed in: a deep link does not ask them to sign in.
Related pages
- Push tap actions: opening a screen from a push notification
- Interactive HTML blocks: navigation from content inside the app