Hide welcome message in mobile

You can hide the welcome message of your chatbot widget on mobile devices using some additional code.

This is how a welcome message looks.

Additional Code

This piece of code must be added just below the code snippet of the chatbot.

<script>
var isMobile = function() {
   return (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/iPhone|iPad|iPod/i) || navigator.userAgent.match(/Opera Mini/i) || navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i));
};
var collectchat = window.collectchat || {};
collectchat.ready = function() {
  if(isMobile()) {
    collectchat.config({
        welcomeMessage: -1,
    });
  }
}
</script>

Please add the above code inside collectchat.ready function if you already have one in your page.



Still need help?

Contact us

Customize