How to Place Messenger in Hidden Mode
Steps to show and hide the Messenger widget on your site
Last Updated:What's in this article?
How to Hide Messenger
While the default state of Messenger is visible on the screen, there are some use cases where you may want to hide the Messenger widget as a default state.
An example of this is to hide Messenger but then display the container when a user clicks a “Get Support” button. Another use case might be to open the user’s Messenger session in a new tab when they click a ‘Get Support’ button rather than leaving it integrated on the screen.
To put Messenger into a Hidden Mode, add the hidden property to your script configuration (the full script is available here for reference) like this:
window.OvationMessenger.config = { integrationId: '5LW7QV', partnerToken: '5470FB424E2047A9EF92', partnerTeam: 'H3F-YEN', hidden: true, }
Once you do this, you will notice that Messenger is no longer visible on your page.
How to Show Messenger
Once Messenger is hidden, you will want to show Messenger it at your desired place and time. For example, if you want Messenger to only show when a user clicks a button, you would trigger the show API (OvationMessenger.show) on the button click. As an example, it could look like this:
<button onclick="OvationMessenger.show()"> Button Name </button>
And to hide it again once it is shown:
<button onclick="OvationMessenger.hide()"> Button Name </button>
How does Hidden Mode Impact Smart Buttons?
When Messenger is hidden, it remains fully functional when invoked by Smart Buttons. This means that you can hide Messenger by default, but when a user clicks on a Smart Button they can still view the help content and when they minimize the screen, the will go back to a hidden state.
Note: Be careful if you use Messenger in Hidden Mode with Smartbuttons if you have Chat enabled. This could potentially lead to a situation where the customer starts by viewing an Article, then starts a conversation to learn more. If they minimize Messenger during this session the only way they will be able to get back to the chat session is to click on the Smart Button again.