How to make your widget invisible when the chat is offline?

It is possible to make the Website Widget invisible at the moment the website chat is offline. 

This can be done by adapting your embed code as follows: 

window.Trengo = window.Trengo || {};
window.Trengo.key = '[your website widget's key]';
(function(d, script, t) {

window.Trengo.on_status_offline = function() {
document.getElementById('trengo-web-widget').style.display = 'none';
};

script = d.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.src = 'https://static.widget.trengo.eu/embed.js';;
d.getElementsByTagName('head')[0].appendChild(script);
}(document));

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like1 Follow
  • Status Answered
  • 1 Likes
  • 4 mths agoLast active
  • 17Views
  • 1 Following