Question
Je dois masquer ou supprimer l’option de chat avec mes agents à partir de certaines pages de mon site web, mais la conserver sur d’autres pages. Comment faire ?
Réponse
Pour supprimer votre widget d’une page web, il vous suffit de supprimer le code source du widget de cette page. Pour en savoir plus, consultez l’article : Suppression du Web Widget (Classique) de votre site web ou centre d’aide.
Si vous souhaitez conserver votre widget sur toutes les pages de votre site web, mais supprimer l’option de chat en direct avec vos agents sur certaines pages seulement, c’est également possible. Si vous disposez du Web Widget, vous pouvez utiliser le code de suppression comme décrit dans cet article : Personnalisation avancée du Web Widget. Si vous avez un compte de chat uniquement, suivez les instructions de l’article : Affichage et masquage de la fenêtre de chat.
6 commentaire
Destiny
Thank you for reaching out.
Yes, the behavior you are describing with the Zendesk Messenger is expected when using the JavaScript API to control its visibility. When you call the
zendeskAPI('messenger', 'close')
method, it triggers the closing animation of the Messenger window, and if you are not callingzendeskAPI('messenger', 'hide')
until the 'close' event gets fired, the default state after closing the Messenger is to show the launcher bubble, which is why you might briefly see the bubble before it gets hidden.Your code is attempting to immediately hide the bubble after closing, but there can be a short delay causing the bubble to appear momentarily. This is due to the lifecycle of the messenger's animations and the event handling by the browser's JavaScript engine.
I hope this information helps.
0
Shirley Xiao
Hi, I wanted to confirm something regarding the messenger and how it acts with hide/show.
In our app at a certain breakpoint and below we hide the messager, for smaller devices. When this happens they can open zendesk messenger again if they click on our support button from a dropdown menu, we did something like this to create that experience:
zE('messenger', 'hide');
zE('messenger:on', 'open', () => {
zE('messenger', 'show');
});
zE('messenger:on', 'close', () => {
zE('messenger', 'hide');
});
However, once they close Zendesk messager we want the messenger to be hidden again, but we briefly see the zendesk bubble before it gets hidden. Is this the expected behavior of the messenger? e.g when users close the messenger the bubble is shown by default so we briefly see the messenger before it is hidden.
0
Mike DR
You're correct, it would require custom coding to create the IF/THEN statement to hide the widget for particular forms. Here's the code for hiding the web widget:
zE('messenger', 'hide');
Article for reference: Core messaging Web Widget API
0
Carmelo Rigatuso
Is there a way to suppress the widget one one particular form in the help center? For example, I want to suppress the widget on https://helpcenter.mycompany.com/hc/en-us/requests/new?ticket_form_id=1111111111, but not on https://helpcenter.mycompany.com/hc/en-us/requests/new?ticket_form_id=2222222, etc.
Would some sort of IF/THEN or CASE in the new_request_page.hbs do it?
0
Erica Girges
Thanks for posting your question to the Community. You could use on chat:unreadMessages to listen for chat notifications coupled with window.location.pathname to track which page the user is on then toggle hide/show for the chat widget based on your needs. Here are the links to the how to hide/show the chat widget.
Another solution, you could just use z-index on the chat widget to move it from the front or back of the page. You'll still want to track chat notifications and location as well though to determine when to change the z-index value.
Hope this helps!
Erica
0
Tom Derbyshire
Is there a way to have the code on all pages but only show on certain pages so that the chat resumes if a user goes from a page with the chat widget to a page without the chat widget so we don't get cut off? Thanks!
0
Vous connecter pour laisser un commentaire.