For the majority of our clients, if they want to share deep links to the apps they’ll use the app domain. However, in some cases you might wish to have the same URLs that are used for your website, to open the app when users have it installed.
For example, if you want to share https://www.vanity.com/mystory and you want this to open in the app in the correct place, there is a fair bit to work to be done:
- NOTE: This is a Pugpig Bolt only feature - deep linking into a story in a Publish Edition forces the entire edition to download so doesn't make much sense.
- You’ll need an app association file on your server that tells the operation system which URLS to open in the app (for example, if all the stories are under /story/ you can target that)
- You will need to provide a redirection service that will redirect from your domain to the pugpig domain and URL If the user agent contains Pugpig. For example:
https://www.vanity.com/mystory -> https://app.vanity.com/mystory/content.html - COMING SOON: If your redirecting service requires redirects to be cached, you should NEVER Vary-By user agent. We provide a separate header x-pugpig-bolt-reader with value true that you can use.
- By default, Pugpig URLs look like this:
https://app.vanity.com/2021/05/30/my-story-slug/content.html
However, to implement the redirection service we will need to agree a URL format with you that allows you to the redirect, for example a format that includes your unique unchanging story ID such as:
https://app.vanity.com/123232354/content.html
When this is in place, the app will open when a user hits https://www.vanity.com/mystory and then follow the redirect that makes sure the user ends up in the right place.
Smartbanner Your Site
If you want to include this on your site, you can simply include the meta tag, using the domain of the app. If you want to have deep links, you’ll need to know the path to the content in the Pugpig CMS
<meta name="apple-itunes-app" content="app-id=34534534245, app-argument=https://app.vanity.com/">
To find out more about smartbanners see - https://pugpig.zendesk.com/hc/en-us/articles/4405181553297-What-is-The-Smart-Banner-
Comments
0 comments
Please sign in to leave a comment.