信标预填功能

Beacon prefill function

我已经设置了 Beacon 'identify' 东西,可以使用 Beacon("open");

打开

但是当我尝试使用 prefill 函数时,出现了一些错误。

Beacon("prefill", {
    name: "Steve Aoki",
    email: "steve@aoki.com",
    subject: "Need help with invoice",
    text: "Hello, I need some help with my invoice. See attached.."
})

错误:Uncaught TypeError: Cannot read property 'filter' of undefined 我错过了任何代码吗?提前致谢。

引用 here

您需要一个 fields 数组,因为在您发布的示例中,您的代码没有一个 fields 数组。这也是因为 filter 是一个数组方法,当你没有 fields 时调用 fields.filter 将导致 undefined 错误。