Home > Hide the Chat Button, then Reveal the Chat Button after X seconds.
(Last Updated On: August 9, 2017)
This is a simple, bare-bones approach to hiding and un-hiding the Chat Button.
This code is usable as-is, but you can change the duration of the wait-time by changing the amount for “secondsToWait.”
// start showButtonTimeout var secondsToWait = 10; // How many seconds to wait until reveal. SnapEngage.hideButton(); // Hide the button immediately. setTimeout( 'SnapEngage.showButton()', secondsToWait*1000 ); // .showButton() after a timeout. // end showButtonTimeout
If this were the only modification you were using with your Code Snippet, your full SnapEngage code would look like this.
*Important: If you copy-and-paste this code, you must replace the WidgetID placeholder (xxx-xxxxxx-xxxx-xxxx), with your own WidgetID.
Let us know if you have any problems with this code snippet.
Published March 29, 2013