Universal Links in Sanity.io

Deep Link to your Sanity Content easily with this Branch.io plugin

Sean Holbert
4 min readJun 14, 2021

With today’s ever growing app ecosystem, deep links now often override click behavior if a user has a compatible app. On a mobile device, tapping a YouTube video should launch that content in the YouTube application, not on youtube.com. Branch.io serves as a great tool to lubricate that process, providing Universal Link hosting and a cascade of defaults for how a given link should be handled based on whether a user has the app. However, many steps are still required to inform Branch of your content and dictate its behavior on a given platform.

This post will show how to link users to your Sanity content in-app with the branch-link Sanity plugin. To get started, you’ll need a Sanity.io project, and a Branch.io account.

Connecting your content

To use Branch with Sanity, Branch links need to get the information about the content they represent. This primarily includes

  1. App Navigation data for deep linking purposes in a mobile app
  2. Open Graph metadata for unfurling (aka “link previews”)
  3. Any tracking information that needs to be embedded in the link for analytics

--

--

Sean Holbert
Sean Holbert

Written by Sean Holbert

App Developer, Open Source Contributor. Github @wildseansy

No responses yet