强制 Journey 为安装了该应用的用户自动打开应用

您可以在模板编辑器中选择 CTA,并使用 Journeys 为安装了该应用的用户自动打开应用:

尽管模板编辑器中的自动打开设置可在 iOS Chrome 和 Android 上使用,但需要注意一些特殊情况:

  • 如果在应用的 webview 内网页上使用 Web SDK,自动打开功能可能会导致不期的用户体验。因此,如果可能,最好避免这种情况发生。

  • 自动打开仅适用于通过点击链接的 Android Chrome;从手动插入的 URL 重定向不会自动打开该应用。

  • 由于自动打开功能是基于 URI Scheme,并且这些 scheme 可能导致没有应用的用户遇到 iOS Safari 上出现错误消息的情形,因此默认情况下此功能未在 iOS 上启用。

    If you would like the app to open automatically on iOS Safari as well, you'll need to use a setting called $uri_redirect_mode. Since Branch has a massive pool of cookies tied to device identifiers, we know if your app is installed when the user clicks a link. We use this intelligence to determine when to use URI schemes. You can reach out to Support to enable this behavior across all your links, or set it just for Journeys in the web SDK:

<script type="text/javascript">
// load the Branch web lib
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="build.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setBranchViewData setIdentity track validateCode".split(" "), 0);
// init Branch and pass in your preference to open the app
branch.init('BRANCH_KEY');
// Trigger your Journeys banner to use the correct redirect mode
branch.setBranchViewData({
        '$uri_redirect_mode': 1
});
</script>

Or, set it for individual templates by adding deep link data $uri_redirect_mode:1

Read our blog to learn more about the challenges of URI schemes on iOS and the URI redirect mode feature.


这个页面对您有帮助吗?