Amazon SES
With Amazon SES, Tolinku handles your click-tracking domain (SES calls it the custom redirect domain). You point it at Tolinku, and Tolinku passes everything through to SES. Links you mark with ses:custom-path open your app; every other link stays in the browser. SES keeps counting clicks.
For how this works and what it needs, see Email Links.
Before you start
Section titled “Before you start”- A paid Tolinku plan. Email links aren’t on the Free plan.
- Your Apple team ID and bundle ID and/or your Android package name and SHA-256 fingerprint in Settings (Configuring iOS, Configuring Android).
- App open attribution not set to Always (Attributing App Opens).
- The Admin or Owner role in the Appspace.
- The AWS region you send email from, for example
us-east-1. - A subdomain to use as the custom redirect domain, for example
click.yourapp.com, and access to its DNS records. SES needs the domain (or its parent domain) verified as an identity in the same AWS account. See Configuring custom domains to handle open and click tracking.
If you already use a custom redirect domain, use that one. If you don’t, create the subdomain now. You don’t need your own CDN or certificate for HTTPS: Tolinku does that part.
Choose a custom path
Section titled “Choose a custom path”Pick a short word your app links will carry, like app. SES puts it in the tracking link’s path: a link marked ses:custom-path="app" becomes https://click.yourapp.com/CL1/app/..., while unmarked links stay /CL0/.... Only links with your path open the app.
The path can use letters, numbers, dots, dashes or underscores, up to 32 characters. It’s case-sensitive.
Add the domain in Tolinku
Section titled “Add the domain in Tolinku”-
Go to Domains in the sidebar.
-
In the Email links card, click Add email domain.
-
Under Tolinku handles the domain, choose Amazon SES.
-
In Click-tracking domain, enter your custom redirect domain, for example
click.yourapp.com. -
In AWS region you send from, choose your region.
-
In Custom path for app links, enter your custom path, for example
app. -
Click Add email domain. The setup steps open.
Prove you own the domain
Section titled “Prove you own the domain”Tolinku only answers on the domain once you’ve proved it’s yours, so nobody else can claim it.
-
Under Prove you own the domain, copy the TXT record. Its name is
_tolinku.followed by your domain, and its value starts withtolinku-verify=.Type Name Value TXT _tolinku.click.yourapp.comtolinku-verify=... -
Add the record at your DNS provider. If the domain already handles clicks, leave its CNAME as it is for now.
-
Click Check the record. When it’s found, the step shows Verified. You can leave the TXT record in place.
Point the domain at Tolinku
Section titled “Point the domain at Tolinku”Do this only after the domain is verified.
-
At your DNS provider, find the record for your custom redirect domain. If you followed the HTTP setup in the SES guide, it’s a CNAME to the SES tracking domain for your region, like
r.us-east-1.awstrack.me. If you put a CDN in front of it, it points at your CDN. -
Make it a CNAME to
edge.tolinku.com.Type Name Value CNAME click(your subdomain)edge.tolinku.com -
Back in Tolinku, the step shows Done once the change is seen, and SSL once the certificate is issued. The certificate is issued for you.
Tolinku passes every request on to the SES tracking domain for your region, so click and open tracking, unsubscribe links and reports keep working.
Set the redirect domain in SES
Section titled “Set the redirect domain in SES”If your configuration set already uses this custom redirect domain, skip this.
In the SES console, edit the configuration set you send with. Under its tracking options, set your domain as the custom redirect domain. Choose an HTTPS policy that wraps links with HTTPS (Require does this for every link). App links must be HTTPS. To count clicks, the configuration set also needs an event destination with click events turned on. See Configuring custom domains to handle open and click tracking, parts 2 and 3.
Mark the links that should open the app
Section titled “Mark the links that should open the app”Add ses:custom-path with your custom path to each link that should open the app. Only those open it; every other link stays in the browser.
<a href="https://links.yourapp.com/product/42" ses:custom-path="app">See the product</a>Point the link at your normal Tolinku link, on your Tolinku domain. Once it’s tapped, Tolinku works out the route from it.
SES removes the attribute before the email is delivered. If the value isn’t valid, SES ignores it and the link stays in the browser. See part 4 of the SES guide. You don’t need to host the files it describes; Tolinku serves them on your domain.
Set up your app
Section titled “Set up your app”The setup steps in the dashboard end with Add the domain to your app, which shows these lines for your domain. The Android path prefix uses your custom path; the example below uses app.
iOS: in Xcode, under Signing & Capabilities, add the domain to Associated Domains:
applinks:click.yourapp.comAndroid: add an intent filter for the domain. The path prefix makes only the links you marked open the app. Give it its own <intent-filter>, so it doesn’t change how your other link domains are matched.
<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.yourapp.com" android:pathPrefix="/CL1/app/" /></intent-filter>In your code: pass every link your app opens with to links.resolve. It needs Tolinku SDK 0.8.2 or later, configured with your publishable API key.
if let link = await Tolinku.shared?.links.resolve(url) { route(link.deepLinkPath)}val link = Tolinku.links.resolve(uri.toString())if (link != null) route(link.deepLinkPath)const link = await Tolinku.links.resolve(url);if (link) route(link.deep_link_path);final link = await Tolinku.instance.links.resolve(url);if (link != null) route(link.deepLinkPath);const link = await tolinku.links.resolve(url);if (link) route(link.deep_link_path);When resolve returns nothing, fall back to your own handling. See Set up your app for the full version.
Release the app update before you send emails that rely on it. People with an older version of your app will see links open the browser, as they did before.
Test it
Section titled “Test it”Send an email through your configuration set to a phone that has the new version of your app, and tap a marked link. The app should open on the right screen. An unmarked link should open in the browser. Tapping a link pasted into Safari’s address bar never opens an app, so always test from an email.
Removing the domain
Section titled “Removing the domain”-
At your DNS provider, point the record back the way it was: a CNAME to
r.REGION.awstrack.me(with your AWS region, liker.us-east-1.awstrack.me), or your CDN. -
Wait for the change to take effect.
-
In Tolinku, open the domain from the Email links card and click Remove.
If you remove it in Tolinku first, links in emails you’ve already sent stop working.
For more questions, see the FAQ.