具有Mandrill子域的通用深层链接 [英] Universal Deep Links with Mandrill sub domain

查看:91
本文介绍了具有Mandrill子域的通用深层链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有适用于我的iOS应用Neighborly(与neighbourly.co.nz关联)的Universal Deep Links

I have Universal Deep Links working for my iOS app, Neighbourly (associated with neighbourly.co.nz)

我们向用户发送电子邮件,并使用Mandrill跟踪点击.电子邮件链接转到子域clicks.neighbourly.co.nz/path,该子域指向mandrillapp.com/path,并且链接重定向到neighbourly.co.nz/newpath

We send out emails to our users and use Mandrill to track clicks. The email links go to a subdomain clicks.neighbourly.co.nz/path which points to mandrillapp.com/path and the links redirect to neighbourly.co.nz/newpath

我已将applinks:clicks.neighbourly.co.nz添加到与应用程序相关的域中.

Ive added applinks:clicks.neighbourly.co.nz to the apps associated domains.

我的apple-app-site-association文件的路径是通配符:["*"]

My apple-app-site-association file's paths is a wildcard: ["*"]

但是,虽然链接到neighbourly.co.nz的应用程序正常启动,但链接到clicks.neighbourly.co.nz的应用程序却在Safari中启动.我想念什么?

But, while links to neighbourly.co.nz launch the app correctly, links to clicks.neighbourly.co.nz launch in Safari. What am I missing?

我在网上找不到有关为深层链接设置子域的任何信息

I can't find any info online about setting up subdomains for deep links

我的apple-app-site-association文件是否需要托管在mandrillapp.com吗?

Does my apple-app-site-association file need to be hosted at mandrillapp.com?

推荐答案

我们使用 Cloudflare (无论如何,我还是建议您使用这项出色的服务).

We solved this at the DNS (kinda) level using Cloudflare (an amazing service I'd recommend using anyway).

将Mandrill设置为使用自定义域,以Cloudflare作为DNS提供程序来进行点击跟踪.例如,在下面的屏幕截图中,它是在Mandrill和Cloudflare中设置的track.yourdomain.com.

Set up Mandrill to use a custom domain for click tracking using Cloudflare as the DNS provider. In the screenshots below for example it is track.yourdomain.com set up in Mandrill and Cloudflare.

Mandrill跟踪域:

Mandrill tracking domain:

Cloudflare DNS:

Cloudflare DNS:

然后在Cloudflare中使用其页面规则"功能来创建对您在实际网站上托管的apple-app-site-association文件的重定向(假设该文件具有适用于两个域的规则,否则,您可能可以重定向至另一个域)文件,我没有对此进行测试)

Then in Cloudflare use their "Page Rules" feature to create a redirect to the apple-app-site-association file you have hosted on your actual website (assuming it has the rules that will work on both domains, otherwise you can probably redirect to another file, I didn't test this)

Cloudflare页面规则:

Cloudflare page rules:

我还添加了缓存绕过规则,因为您希望对track.yourdomain.com的所有请求都到达源服务器,而不是由边缘服务器缓存.

I also added a cache bypass rule because you want all requests to the track.yourdomain.com to reach your origin server and not get cached by an edge server.

这篇关于具有Mandrill子域的通用深层链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆