Links in your emails that open your app
Your email platform wraps every link to count the click, and that sends people to the browser. Tolinku keeps the count and opens the screen the link points at: the order, the product, the offer.
- SendGrid, Amazon SES and Braze
- Klaviyo, Iterable, Salesforce Marketing Cloud and Customer.io
- The click counted once, by your email platform
-
Der TapPantry's weekly email, sent with SendGrid. The button links to links.pantry.app/product/42 and is marked universal="true", so SendGrid wraps it as a /uni/ link on Pantry's click domain.
-
The phone opens Pantryclick.email.pantry.app points at Tolinku, which serves Pantry's association file there, listing /uni/* only. So the phone opens the app. Unsubscribe and every other link stay in the browser.
-
The SDK unwraps the linkPantry passes the tapped address to links.resolve. Tolinku asks SendGrid where it leads, once, and doesn't follow the redirect. SendGrid counts the click and answers with /product/42.
-
Pantry opens on the product/product/42 is Pantry's Product pages route, so the app shows the oats, as for any other link. In SendGrid's report it's one click, as before.
-
The same tapThe same email, while click.email.pantry.app still points at SendGrid. SendGrid has wrapped the button's link in an address on its own tracking host, as it does every link.
-
The browser opensNo app has claimed click.email.pantry.app, so the phone opens the browser. SendGrid counts the click and redirects to links.pantry.app/product/42.
-
Still in the browserA redirect doesn't reliably open an app, so the person stays in the browser, on the hand-off page and on the way to the store, with Pantry already on the phone.
-
Der TapPantry's order email, sent with Klaviyo. Klaviyo has wrapped the link to links.pantry.app/order/58240/track in a tracked address on trk.pantry.app, its click domain for Pantry.
-
The phone opens PantryKlaviyo serves the two files Tolinku generated, which Pantry uploaded once. The phone reads them for trk.pantry.app and opens the app, not the browser.
-
The SDK unwraps the linktrk.pantry.app isn't Tolinku, so links.resolve asks Tolinku's API, with the app's publishable key. Tolinku asks the tracked link once, without following it, and Klaviyo counts the click.
-
Pantry opens on the order/order/58240/track is Pantry's Order tracking route. The order opens in the app, where the person is signed in, not on a web page.
Sample data for a made-up app, Pantry, on a neutral phone. The association files, the requests and the answer are the platform's own; the panel is worded as the dashboard's Domains page words it.
Das Problem
Why a link in an email opens the browser
Email platforms rewrite every link to count the click. The address that gets tapped is the platform's, so the phone has no app to open it with. Most teams give up either the app or the report.
-
The tap lands on the platform's domain
Your link becomes a tracking address on the email platform's click domain. Your app has no claim to that address, so the browser opens it.
click-tracking domain -
The redirect doesn't open the app
The platform counts the click and redirects to your link, but the person is in the browser by then, and a redirect doesn't reliably open an app.
302 -
Turning tracking off empties the report
Without click tracking the links open the app, and the campaign report goes blank.
click tracking -
Unsubscribe has to stay on the web
Claiming the whole click domain would also send unsubscribe and view-in-browser links into the app.
/uni/*
So funktioniert es
Three steps to emails that open your app
-
Add your click domain
In Domains, choose your email platform and enter its click-tracking domain. Your platform decides which of two ways it works.
- Tolinku handles the domainSendGrid, Amazon SES, and Braze sending with either.
- Your platform hosts the filesKlaviyo, Iterable, Salesforce Marketing Cloud and Customer.io.
-
Prove it, point it, mark your links
A TXT record proves the domain is yours. Then its CNAME moves to Tolinku and the certificate is issued for you. On the other platforms you upload two files Tolinku generates, and nothing changes in your DNS.
-
TXT _tolinku.click.email.pantry.appProves the domain is yours -
CNAME click.email → edge.tolinku.comIt pointed at sendgrid.net. Every other request still goes there -
universal="true"On each link that should open the app
-
-
Update your app
Add the click domain to Associated Domains and an Android intent filter, and pass every link the app opens with to links.resolve. Then play each case in the demo.
Both halves keep working
The app opens, and the report still adds up
Tolinku sits between the tap and your email platform's tracking without replacing it.
-
By your email platform
Einmal gezählt
Tolinku asks the platform where a tapped link leads and doesn't follow the redirect, so the platform records the click as it always has. The SDK asks once and never retries.
-
SendGrid and Amazon SES
Only the links you mark
Tolinku claims SendGrid's /uni/ links or your Amazon SES custom path. Unsubscribe, view in browser and open tracking go to your email platform untouched.
-
Proved with DNS
Yours to claim
Tolinku answers on a click domain only once a TXT record proves it's yours, and for one Appspace only: the first to verify it.
The click domain click.email.pantry.app
As its setup steps in Domains show it
- Übergeben: Ownership Verified with the TXT record _tolinku.click.email.pantry.app
- Übergeben: DNS The CNAME points at edge.tolinku.com, not sendgrid.net
- Übergeben: SSL The certificate is issued for you
-
Übergeben:
apple-app-site-associationLists /uni/* for 7XQ2K9LM4P.app.pantry.ios -
Übergeben:
assetlinks.jsonServed for app.pantry.android
Aktivitätsprotokoll
- Verified ownership of the email click domain click.email.pantry.app Tony Mensah
- Added the email click domain click.email.pantry.app Tony Mensah
- Added the email click domain trk.pantry.app Ana Souza
Für Entwickler
One call in your app, two files on the domain
The app hands every link it opens with to the SDK. Tolinku serves or generates the files that let the phone open the app from the click domain.
- One call for every link
- links.resolve takes any link the app opens with: an email link, a short link or a plain one. It returns the route, the token and the path, or nothing, and never throws.
- Asked once, never retried
- The SDK asks the link's own host, then Tolinku's API with your publishable key, only when that host isn't Tolinku. Each has 5 seconds. A retry would count the click twice.
- Only the paths you mark
- On a domain Tolinku handles, the iOS file lists SendGrid's /uni/* or your Amazon SES custom path, and Android needs the same prefix in an intent filter of its own.
- SDK 0.8.2 or later
- On iOS, Android, React Native, Flutter and the web SDK in Capacitor or Cordova. People on an older version of your app get the browser, as before.
func handle(_ url: URL) async {
if let link = await Tolinku.shared?.links.resolve(url) {
route(link.deepLinkPath) // for example /product/42
} else {
// Not a link Tolinku could resolve: fall back to your own handling.
}
}
lifecycleScope.launch {
val link = Tolinku.links.resolve(uri.toString())
if (link != null) {
route(link.deepLinkPath) // for example /product/42
} else {
// Not a link Tolinku could resolve: fall back to your own handling.
}
}
{
"path": "/uni/ls/click",
"url": "https://click.email.pantry.app/uni/ls/click?upn=u001.Kq7Z"
}
200 OK
{
"route": {
"prefix": "product",
"name": "Product pages",
"template": "none",
"link_type": "dynamic"
},
"token": "42",
"deep_link_path": "/product/42",
"appspace": {
"name": "Pantry",
"slug": "pantry"
}
}
{
"applinks": {
"apps": [],
"details": [
{
"appID": "7XQ2K9LM4P.app.pantry.ios",
"paths": [
"/uni/*"
]
}
]
}
}
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="click.email.pantry.app"
android:pathPrefix="/uni/" />
</intent-filter>
Fragen
Which email platforms does it work with?
SendGrid, Amazon SES, and Braze when it sends through either: Tolinku handles the click domain. Klaviyo, Iterable, Salesforce Marketing Cloud and Customer.io host the files on their own domain, and Tolinku generates them. Mailchimp doesn't offer a click-tracking domain of your own and OneSignal email isn't supported. A platform that isn't listed isn't supported yet.
Will clicks be counted twice?
No. When the app opens, Tolinku asks your email platform where the link leads and doesn't follow the redirect, so the platform records the click once, in its own reports. The SDK asks once and never retries. Customer.io doesn't wrap app links, so Tolinku reports the click to Customer.io for you.
Do unsubscribe links and open tracking still work?
Yes. With SendGrid and Amazon SES only the links you mark open the app: universal="true" links, or links with your Amazon SES custom path. Every other request to the domain, unsubscribe and view in browser included, goes on to your email platform as it came.
What should the links in my emails point at?
Your Tolinku links, such as links.pantry.app/order/58240/track. Tolinku turns the tapped address back into that link, then into its route. A link to a page that isn't one of your routes comes back empty, and the app falls back to its own handling.
What if the person doesn't have the app?
The phone opens the link in the browser, your email platform counts the click and redirects to your Tolinku link, and that link does what it always does: your landing page or the store, then the same screen on the first launch after the install.
What does my app need?
Tolinku SDK 0.8.2 or later with your publishable key, the click domain in Associated Domains on iOS and in an intent filter of its own on Android, and every incoming link passed to links.resolve. Release the update before you send emails that rely on it.
Welche Tarife enthalten das?
Paid plans and the trial. An Appspace can have up to 20 email domains. If the plan lapses, links on a domain Tolinku handles open in the browser again, still work and are still counted. Where your platform hosts the files, the app still opens but gets no answer, and falls back to its own handling.
Why does App open attribution matter?
Set to Always, Tolinku keeps links away from the phone so every tap is counted before the app opens, and email links then stay in the browser too. The domain's setup steps say so when that's the case.
I use Cloudflare for DNS. Anything to change?
Set the CNAME to DNS only (grey cloud), as you would for a custom domain. And with SendGrid, don't validate the link branding again after the change: SendGrid would report the new record as wrong, and it's fine as it is.
Can I stop using it?
Yes. Point the CNAME back at your email platform first, then remove the domain in Tolinku. Emails you've already sent keep using the click domain, so removing it while it still points at Tolinku would break their links.
Send an email that opens your app
Add your click domain, update your app, and tap a link in a real email before the campaign goes out. Email links are on paid plans and the trial.