Branch.io Smart Banner Journey 无法检测应用是否已下载

Branch.io Smart Banner Journey Unable to Detect If App Downloaded

我实现了一个 branch.io journey 智能横幅,我想使用它的检测功能来判断我的应用程序是否已被下载。

但是,该数据返回为空。

这是我的代码:

import { BRANCH_KEY } from 'constants';

import branch from 'branch-sdk';

import './styles.scss';

branch.init(BRANCH_KEY, {}, (err, data) => {
  console.log('data', data);
});

console.log 的输出是这样的:

{data: "{"+clicked_branch_link":false,"+is_first_session":true}",
data_parsed: {…},
has_app: null,
identity: null,
referring_identity: null
}

Branch 使用概率方法检测用户是否使用 URI 方案和角色数据在设备上安装了应用程序。请注意,您不应依赖 has_app 参数,因为它是在 Branch 服务器上按概率计算的,并且准确性会随着 Branch 在上看到特定设备的次数而自动增加分支网络。