Question
I don't want my widget minimized and to require a click to open chat when a customer first visits my website. I want live chat to pop up and open automatically without my customer needing to request a chat manually. How can I do that?
Answer
Note: Messaging does not have out-of-the-box proactive notification functionality. For information on messaging, see the article: Messaging vs live chat: which is right for you?
To make your widget open up into a live chat when the customer first loads the page, you have two options:
- Use a chat trigger as described in this article: Targeting key visitors with proactive chat.
- Add the following code right below the widget script in your website:
<script type="text/javascript">
zE(function() {
zE.activate();
});
</script>
Disclaimer: The above code is provided for instructional purposes only. Zendesk does not support or guarantee the code. Post any issues you have in the comments section or try searching for a solution online.
5 comments
Inspera LLC
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');">
1
Davide Cuppone
Hello, I tried
and receive the error
the other solution
does nothing
0
David
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
Chris Vázquez
Hey David, I tried your solution above and it still doesn't work unfortunately.
0
Chris Vázquez
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