如何在客户加载我的网页时,使小组件直接打开进行在线交谈会话?



image avatar

Elissa Tikalsky

Zendesk Digital Resources Team

已于 2025年4月03日 编辑


0

0

5 条评论

I've used ChatGPT to create many variations of HTML and all of them can display the widget on a blank webpage but I can't figure out how to have the widget open automatically without being clicked no matter what I try. It's loaded and can be clicked - just can't get it to open automatically

0


Hey David, I tried your solution above and it still doesn't work unfortunately.

0


Hi Davide, 

Usually that zE.activate is not a function error is from the Widget code not actually being loaded on the site correctly.  Ensure it is then try that again.  

Assuming it IS loaded, try to wrap the code in a setTimeout function to delay its execution until the zE object is available with this:
<script type="text/javascript">
  setTimeout(function () {
    zE(function () {
      zE.activate();
    });
  }, 3000);
</script>

0


Hello, I tried

zE(function() {
zE.activate();
});

and receive the error 


zE.activate is not a function

the other solution 

zE('messenger', 'open');

does nothing

0


I was brought to this post by wanting to link "contact us" buttons and links to our Messenger widget. I found the following workaround on my own:

<a href="javascript:void(0);" onclick="zE('messenger', 'open');">

That will cause the messenger on your page to open on clicking the button or link.

1


登录再写评论。