Recent searches


No recent searches

How do I make the widget open up directly to a live chat session when my customer loads my webpage?



image avatar

Elissa Tikalsky

Zendesk Digital Resources Team

Edited Oct 24, 2022


0

5

5 comments

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


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


image avatar

David

Zendesk Customer Care

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


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

0


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


Please sign in to leave a comment.