Removing Live Chat from some pages on Single Page Application

SOLVE
Highlighted
New Member

Is there any way to remove the chat bubble from certain URLs on a Single Page Application. Adding URL's in targeting does not work because URLs aren't reloaded on Single Page Applications.

This is a serious limitation to Live Chat. In our case it makes it unusable.

Is there any workaround? Even if we could only have it on our home page it would be somewhat usable - but as it is it's either on every page or none. That's not viable - especially when the bubble's position is not movable.

1 Accepted solution

Accepted Solutions
Highlighted
Solution
HubSpot Alumni

Hey @morgan, thanks for your HubID and the extra info. I thought maybe only a part of your site was an SPA, which is why I pointed out those settings. Yes we are working in fixing the messages widget for SPAs. There are no workarounds at the moment, but you should expect a fix in January or February.

View solution in original post

24 Replies 24
Highlighted
HubSpot Alumni

Hi @morgan, adding the ability to change URLs on SPAs for the chat widget is something our team is actually working on as we speak so it should be possible soon, though I don't have a hard date for that. As I know it, however, you should be able to specify which pages it appears on and not have it on every single page. You can get to the settings of a chat widget by going to Settings > Conversations > Inboxes > Hover over your inbox and click edit > Chat > Hover over the targeted message and click edit > Targeting. The URL structure to get there is here: https://app.hubspot.com/live-messages-settings/3430672/inboxes/956/message/6329

Here's what this page looks like:

Have you explored these settings? The knowledge article is here: https://knowledge.hubspot.com/articles/kcs_article/conversations/how-to-use-conversations -- if you command + F for "Targeting" you'll find it.

Edit -- can you also pass along your HubID so we reach out directly when the SPA compatibility for Messages comes out? Thanks!

New Member

Hi Connor - thanks for the reply. My id is 5145543 far as I know (that's what shows up in the URL).

I did explore the options you point to - in fact that is the precise problem I was pointing to. Entering URL's in these settings only has an effect if I refresh a page on our SPA. Obviously that isn't practical. So for example, a page I don't want the chat bubble and whose URL I've excluded via these settings will show the bubble when I navigate to it, but if I hit refresh it will disappear.

I assume you are aware of this problem if you say you are working on it.

Please do let me know when there is a fix or if you know any workaround. Hubspot is no use to me until then as I only signed up for this live chat feature.

Thanks,

Morgan

0 Upvotes
Highlighted
Solution
HubSpot Alumni

Hey @morgan, thanks for your HubID and the extra info. I thought maybe only a part of your site was an SPA, which is why I pointed out those settings. Yes we are working in fixing the messages widget for SPAs. There are no workarounds at the moment, but you should expect a fix in January or February.

View solution in original post

Highlighted
Occasional Contributor

Hi - mid-February now - wondering if there's any ETA on this fix for live chat on SPA's? I'm paying a monthly subscription right now for something I can't use. 

 

Thanks,

 

Morgan

0 Upvotes
Highlighted
HubSpot Alumni

Hi @morganthunder , we're working on rolling this out soon. We will have a group of users beta testing the feature and I've submitted your HubID as one of those. Thanks

Highlighted
New Contributor

Hi Connor,

 

Same situation here, we have a React SPA and can't use the chat because we only want it on a particular route. I tried to add it via tag manager instead but same issue happens, once the trigger fires the chat stays there forever. Could you add us to the beta testing? Our ID is 4066954.

 

Thanks,

Alex

0 Upvotes
Highlighted
Occasional Contributor

Any update on this? In one of your last replies you said it was coming in January or February. Heading into April now and no sign. I actually don't use Hubspot at all because this was what I wanted it for so still paying monthly subscriptions on the basis of what I was told about the feature being imminent.

0 Upvotes
Highlighted
HubSpot Alumni

Hi @morganthunder / @AlexLillo , Morgan, it looks like your HubID was already ungated for this feature a few weeks ago, did you ever receive an email from our team to invite you to view the gated documentation? You can access different widget methods by using 

window.HubSpotConversations.widget

if you are ungated.

 

Either way, this feature should be rolled out today, so both of you will be able to access this within 24 hours.

0 Upvotes
Highlighted
Occasional Contributor

Hi - thanks for the reply. Yes that is our ID but no I never got any email about this.  I tried to check out the documentation you've linked to but it says password required and when I enter 'livechat' for password as you suggest it says the password is incorrect.

 

Thanks,

 

Morgan

0 Upvotes
Highlighted
HubSpot Alumni

I've DM'd you @morganthunder 

0 Upvotes
Highlighted
Occasional Contributor

Was this ever deployed to production?? I have a SPA and it's not letting me specifiy showing/hiding based on the URLs.

0 Upvotes
Highlighted
New Contributor

I just wanted to see if this was still anticipated for Feb? Thanks!

0 Upvotes
Highlighted
HubSpot Alumni
0 Upvotes
Highlighted
Occasional Contributor

I take it we are going to have to get a developer to implement support for this issue rather than being able to control it in the Chatflows are of the Hubspot console?

0 Upvotes
Highlighted
HubSpot Alumni

Hi @slothmike , for single page applications, that's correct.

0 Upvotes
Highlighted
New Member

We're trying to just show/hide the chat widget on an SPA app.  We're able to track the pages in hubspot, but the show/hide feature in chatflows doesn't seem to support the same pages... What gives? 

0 Upvotes
Highlighted
Occasional Contributor

Hey @njsteele 

We had to call Javascript functions provided by the Hubspot API here: https://developers.hubspot.com/docs/methods/conversations_api/hubspot-conversations-javascript-api

 

Our app is Angular 1 based SPA and we actually used Google Tag Manager to deploy and execute the JS functions to control the appearance/visbility of the Chat Widget. We just finished a configuration on our test sie and are looking at deploying it soon if it checks out.

0 Upvotes
Highlighted
New Contributor

Hi @cbarley ,

 

Is there a plan/roadmap for adding support for SPA without requiring the use of the JS API?

 

Thanks a lot.

0 Upvotes
Highlighted
New Member
#hubspot-messages-iframe-container {
    display: none !important;
}

You can remove the button by setting the iframe's display to none.

Highlighted
New Contributor

Hi,

Is there any news on this topic ? I have the same problem.

I would like to have the chat on my homepage only but the chat bubbles follow me on every pages unless I refresh the page, which is not so great for me.

Is thre a solution for this ?

 

Thanks,

Nina

Highlighted
Occasional Contributor

We had to use Javascript API to handle this: https://developers.hubspot.com/docs/methods/conversations_api/hubspot-conversations-javascript-api

 

We used Google Tag Manager and called the Javascript API when we needed to hide the chat widget and caleld it again when we needed to show it. 

Highlighted
Occasional Contributor

I am having the same issue now also. Any plans to get it fixed? 

Highlighted
New Member

Same problem here. There are times when the chat bubble should not show on my site and there should be some way to hook into init sequence in WordPress - but it's not clear how to do this.  

0 Upvotes
Highlighted
Occasional Contributor

If you use Google Tag Manager, you should be able to call the Javascript API for the widget by injecting some JS functions into your page and control it that way: https://developers.hubspot.com/docs/methods/conversations_api/hubspot-conversations-javascript-api