Skip to content

Klaviyo

Klaviyo hosts the association files on its own click-tracking domain. Tolinku generates the files for your app, and you upload them in Klaviyo. Nothing changes in your DNS. When a link opens your app, the Tolinku SDK asks Tolinku where it leads, and Klaviyo still counts the click.

For how this works and what it needs, see Email Links.

  • 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). Tolinku builds the files you upload from these.
  • App open attribution not set to Always (Attributing App Opens).
  • The Admin or Owner role in the Appspace.
  • A dedicated, Klaviyo-hosted click-tracking domain. Klaviyo only supports app links on its own tracking domains, not on domains hosted by another provider.

Klaviyo’s guide also lists its own SDK. That’s how Klaviyo’s own setup unwraps the link in your app; here, the Tolinku SDK does that job.

  1. Go to Domains in the sidebar.

  2. In the Email links card, click Add email domain.

  3. Under Your platform hosts the files, choose Klaviyo.

  4. In Click-tracking domain, enter your Klaviyo click-tracking domain, for example trk.yourapp.com. Nothing changes in your DNS.

  5. Click Add email domain. The setup steps open.

Under Upload these files to your email platform, the setup steps show two files, each with a Copy button:

  • apple-app-site-association, for iOS;
  • assetlinks.json, for Android.

If a file is missing, the step says what to add in Settings first. To upload a file, paste the copied text into a plain text file and save it with exactly that name. The apple-app-site-association file has no extension.

  1. In Klaviyo, go to Settings, then Push notifications, and open the Universal & app links tab.

  2. Check your tracking domains in the card. If one shows Setup required, finish its setup first. Once a domain shows Ready, click Set up.

  3. Enter your target domain: the website domain in your message links, without https:// or a path. Use your Tolinku link domain, for example links.yourapp.com.

  4. Click Next, upload both files, and click Save.

  5. Check the tracking domain’s status. If it shows Ready, click Enable in its row. It should show Active.

Klaviyo’s own guide has the details: About universal links and App Links.

Klaviyo reads the paths in the apple-app-site-association file to decide which links to rewrite as app links, for Android as well as iOS. The file from Tolinku covers every path, so every link to your Tolinku link domain opens the app. To keep one link in the browser, add universal="false" to it in the HTML.

Point app links at your normal Tolinku links, on your Tolinku domain:

<a href="https://links.yourapp.com/product/42">See the product</a>

When it’s tapped, Tolinku works out the route from it.

The setup steps in the dashboard end with Add the domain to your app, which shows these lines for your domain.

iOS: in Xcode, under Signing & Capabilities, add the domain to Associated Domains:

applinks:trk.yourapp.com

Android: add an intent filter for the domain. 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="trk.yourapp.com" />
</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)
}

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.

Send a test email to a phone that has the new version of your app, and tap a link to your Tolinku domain. The app should open on the right screen. Tapping a link pasted into Safari’s address bar never opens an app, so always test from an email.

Remove the files from Klaviyo first. Then, in Tolinku, open the domain from the Email links card and click Remove.

If you only remove it in Tolinku, links keep opening your app, but Tolinku no longer says where they lead, so your app falls back to its own handling.

For more questions, see the FAQ.

Was this page helpful?