Support for SPA with Chat

amartin

Hi Guys,

 

This is kind of a pity that there is no support yet for SPA with the HubSpotc chat. We would really appreciate having the chat firing on some pages only of the SPA, and not everywhere.

 

Thanks for your support 🙂

7 Replies
mwakerman
Member

Came here to propose the same idea. To explain the issue a bit:

 

  • We want the live-chat feature to show up on our home page (`/home`) but not on the login page (`/login`) or in a "workspace"  (`/workspace/1234`)
  • If a user starts at `/home` then the plugin loads correctly but then also sticks around when they follow a link to a workspace.
  • If they start on a workspace and then go back to the home page then the plugin doesn't show up.
  • Most problematic is that if they go through a typical login path then it also doesn't show up.

The only workaround we've thought of (but chosen not to implement) is to throw in some page refreshes at certain points to trigger the plugin to re-initialise.

 

Ultimately, this level of inconsistency is blocking us from deploying this plugin.

 

If a developer is reading this, please check out: https://github.com/KidkArolis/location-bar.

amartin
Member

OK i found a quite easy (partial) workaround for it. I added a tag in Google Tag Manager that hide/show chat icon depending of new URL fragment. This is easy to implement, but not perfect. I still cannot pass correctly the page URL to HubSpot so i can have different chat behavior depending of the page.

 

@hubspoteam: how can i potentially pass URL to HubSpot tag using Google Tag Manager? @mwakerman Let me know if you have any idea.

Status updated to: In Planning
hroberts
HubSpot Product Team
 
mwakerman
Member

Hi, great to see this being actioned. Wondering if there is any update? We're currently holding off going with a different solution because we'd rather stick w/ HubSpot.

mwakerman
Member

We ended up just using Intercom. Would've loved to keep using HubSpot but needed this feature and didn't get an update/timeline.

arenasv
Member

Please keep us informed about these feature. SPA's aren't something isolated and we've removed the chat from our software, for the same reasons above. At least, the chat could have an API, so we can show it and hide it based in our router current page.

Status updated to: Delivered
cdewey22
HubSpot Product Team

Hi all- We have created an API to solve this problem. You can find the technical documentation here https://developers.hubspot.com/docs/methods/conversations_api/widget_refresh

 

Let me know if you have any feedback! 

 

Thanks!