1

My team released an Android app and asked for a smart banner directing users from our website to the app and specific content; to complete this task, we are using branch.io.

According to this guide, I inserted the JavaScript snippet with the branch key found in the settings section of the dashboard and the SDK is correctly initialized.

In the dashboard we defined the styling of the banner and on which sites and devices it should appear. But the banner looks like this (on desktop):

enter image description here

No icon or text are set. Apparently when I use the preview link generated by branch.io it is displayed correctly.

Moreover when I initialize the banner via JavaScript and set the properties it is displayed correctly too:

branch.banner(Banner.options, Banner.data);

const deeplink = `${window.location.pathname}${window.location.search}${window.location.hash}`;

branch.setBranchViewData({
    '$deeplink_path': deeplink
});

Somehow nothing from the dashboard is adopted.

Thank you for your help!

4

2 回答 2

1

来自 Branch.io 的 Alex 在这里:branch.banner()您在仪表板上设置的功能和横幅实际上是分开的。仪表板选项取代了banner()已弃用的方法。

您需要查看设置指南中的完整详细信息。一个重要的注意事项是仪表板版本尚不支持桌面横幅,因为我们发现几乎没有合作伙伴使用该功能。

于 2017-02-01T06:49:37.053 回答
0

试试smartbanner.js。有很多自定义选项和行为,占用空间非常小(~ 13 KB)。需要一些元标记来设置。

于 2020-06-18T21:15:57.743 回答