← Back to API
Hide the chatbox
olark('api.box.hide');
Notes
Hides the chatbox. This box will make the chatbox disappear on the page, but operators will still be able to see visitors in their visitor list.
Hide the chatbox if not logged in
You might want Olark to be loaded in the background on a particular page, but not show immediately. Here’s how that might look in PHP:
<?php
// Check to see if the user is logged in
if (!$user_logged_in)
{
// Hide the chat box
olark('api.box.hide');
}
?>
You can also use our Targeted Chat tool to hide the widget, without altering the code of your website.