阅读Zopim(又名的Zendesk聊天)的the documentation:
API调用必须插入在线聊天脚本后并在$ zopim包裹(函数(){...})
所以我有一个在Zopim脚本的HTML head
部分:
<script>/*<![CDATA[*/window.zEmbed||function(e,t){ ... }("https://...);
/*]]>*/</script>
然后我说这个在HTML文档的末尾:
$zopim(function() {
$zopim.livechat.setName('Logged in name');
$zopim.livechat.setEmail('[email protected]');
});
和控制台说:
$ zopim没有定义
我想我已经遵循正确the instructions。我错过了什么?
你解决了这个问题吗?我也有同样的问题 –
不。我写了一个超时的丑陋黑客攻击,我会将其作为回答 –