tidioChatApi.setVisitorData 未更新用户名
在我的index.html中,我有以下代码来显示tidio实时聊天。这将名称作为客人设置为他们以前从未登录的。 (可行)
<script
src="tidio link"
async
></script>
<script>
document.tidioIdentify = {
name: "Guest", // Visitor name
};
</script>
但是,一旦他们登录,我想以名称登录。我已经在主页上的HTML(与上面的单独的HTML)添加了此代码:
<script>
tidioChatApi.setVisitorData({
name: "bob",
});
</script>
但是,它永远不会更新名称。有人知道为什么吗?脚本似乎没有被调用
In my index.html i have the following code to display a tidio live chat. This sets the name as a guest as they haven't logged in before. (that works)
<script
src="tidio link"
async
></script>
<script>
document.tidioIdentify = {
name: "Guest", // Visitor name
};
</script>
However, once they do login i want to get their logged in name. i have added this code to the html on the homepage (separate html from above) like this:
<script>
tidioChatApi.setVisitorData({
name: "bob",
});
</script>
However, it is never updating the name. Does anyone know why? The script doesn't seem to be getting called
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在调用“setVisitorData”之前检查 Tidio 是否已准备好,如下例所示:
此处引用 Tidio 文档:
https://docs.tidio.com/docs/listeners_events
https://docs.tidio.com/docs/visitor_identification
You need to check if Tidio is ready before calling "setVisitorData" as per the following example:
References to Tidio documentation here:
https://docs.tidio.com/docs/listeners_events
https://docs.tidio.com/docs/visitor_identification