<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't get SPA to select chat flow in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138299#M81672</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What framework (route manager) are you using in your application?&lt;/P&gt;</description>
    <pubDate>Sun, 20 Apr 2025 12:28:38 GMT</pubDate>
    <dc:creator>sylvain_tirreau</dc:creator>
    <dc:date>2025-04-20T12:28:38Z</dc:date>
    <item>
      <title>Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1136766#M81611</link>
      <description>&lt;P&gt;I've set up a chatflow where I check whether WebSite URL contains a specific word. This works if I load the browser with a URL with the specified word in it. But I can't get this to work in my single page application. On navigation I do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;history.pushState({ state: &amp;lt;state&amp;gt;, title: &amp;lt;title&amp;gt; }, &amp;lt;title&amp;gt;, &amp;lt;url&amp;gt;);&lt;/P&gt;&lt;P&gt;_hsq.push(['setPath', &amp;lt;relative url&amp;gt;]);&lt;BR /&gt;_hsq.push(['trackPageView']);&lt;/P&gt;&lt;P&gt;window.HubSpotConversations.widget.refresh();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I read the documentation, widget.refresh() should activate the chatflow based on the URL set in pushState, but this does not work for me.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 23:09:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1136766#M81611</guid>
      <dc:creator>HLarsen</dc:creator>
      <dc:date>2025-04-15T23:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1136870#M81620</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/183249"&gt;@HLarsen&lt;/a&gt;&lt;/SPAN&gt;, I hope that you are well!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;First, for information, I'd like to share the documentation about the topic: "&lt;A href="https://developers.hubspot.com/docs/reference/api/conversations/chat-widget-sdk" target="_blank"&gt;Conversations SDK&lt;/A&gt;".&lt;BR /&gt;&lt;BR /&gt;I'd love to put you in touch with our Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1377"&gt;@MatthewShepherd&lt;/a&gt;&lt;/SPAN&gt;, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; do you have suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/183249"&gt;@HLarsen&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;Have a lovely day and thanks so much in advance for your help!&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 06:56:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1136870#M81620</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-04-16T06:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138299#M81672</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What framework (route manager) are you using in your application?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 12:28:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138299#M81672</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-04-20T12:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138318#M81673</link>
      <description>&lt;P&gt;I don't know what you mean. It's a browser based application using jQuery.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 15:14:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138318#M81673</guid>
      <dc:creator>HLarsen</dc:creator>
      <dc:date>2025-04-20T15:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138324#M81674</link>
      <description>&lt;P&gt;Without more code, it's hard to answer you. But basically, you need to force the Hubspot widget to reevaluate the chatflow rules every time the URL changes.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 16:26:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138324#M81674</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-04-20T16:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138326#M81675</link>
      <description>&lt;P&gt;That's what I'm trying to do with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;window.HubSpotConversations.widget.refresh();&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Apr 2025 16:29:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138326#M81675</guid>
      <dc:creator>HLarsen</dc:creator>
      <dc:date>2025-04-20T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get SPA to select chat flow</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138406#M81681</link>
      <description>&lt;P&gt;I think you should do something like that:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function handleUrlChange(path){
  window._hsq = window._hsq || [];
  window._hsq.push(['setPath', path]);
  window._hsq.push(['trackPageView']);
  window.HubSpotConversations?.widget?.refresh();
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Apr 2025 05:52:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-get-SPA-to-select-chat-flow/m-p/1138406#M81681</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-04-21T05:52:18Z</dc:date>
    </item>
  </channel>
</rss>

