Hiding live chat on mobile

New Member

Hello, 

 

My client wishes to hide live chat on mobile devices. I have the live chat code embedded on two sites, one a Wordpress install and the other Shopify. I've successfully hidden the chat on the Wordpress site with CSS and JS, but that did not work on Shopify. 

 

Additionally, WHEN I REMOVED THE EMBED CODE ENTIRELY FROM MY SHOPIFY SITE, THAT CHAT STILL APPEARS. This has persisted for four or five days now, across various browsers, clearinc cache etc.

 

I turned the website off and on again in hubspot. Same problem. 

 

Can anyone advise what might be going on?

7 Replies 7
Occasional Contributor

I'm also looking for an answer to this. 
We are getting people complaining about the chat prompt taking up too much space on mobile screens.

I'd rather let first-time traffic read our site and not have this prompt. 

How do we hide on mobile?

New Contributor | Platinum Partner

I figured out how to do this on a website hosted on HubSpot's CMS as there is no option to disable mobile in the GUI.

 

If you paste this into your website's header, this will do it:

 

<style>
  @media screen and (max-width: 600px) {
    #hubspot-messages-iframe-container { display:none !impportant; visibility: hidden;}
}
</style>

I can't speak to a site on Shopify or WordPress using a HubSpot Sales website sales chat script via an embed code, but the above definately works on the HubSpot CMS.

 

PS - I also looked into using conditional JS to hide the chat script using a media query similar to CSS, but that won't work because it is called through the HubSpot tracking code so you can't edit that... 😞

Reply
0 Upvotes
New Contributor

Thanks for the tip. We implemented in our non-hubspot (wordpress) web site and managed to hide the chat as well

New Contributor

I would love to have a simpler way to either turn off the chat bot on certain pages or minimize it so that it isn't so big once someone goes on the webpage. The workaround is a bit complex and requires the help of IT and CSS coding etc. 

New Member

Hubspot developers just need to put in a Mobile (on/off) switch when doing the live chat set-up

Visitor

Agreed! C'mon devs, this request is from 1.5 years ago. How hard is it to implement an on/off toggle for mobile? It completely obscures my mobile content (bottom right of the screen).

Regular Contributor

 Hubspot is one of the biggest companies in the segment and it's crazy how it takes so long to implement such a easy stuff. 

Reply
0 Upvotes