In an effort to integrate Chatflow with my web application, I included the embed code to index.html. I added a few target rules to the chat flow. The login page’s chatflow was enabled by me. After logging in, I disabled the conversation flow on the home page. However, it remains after logging in. When I restart the page, it is gone. I updated the chatflow targets to include this rule. My application is single page application(React).
Hey, @DR29
Thanks for your question. Have you already tried using the Conversations JavaScript API to try to control the behaviour?
Something similar to:
{
if (location.pathname === "/home") {
window.HubSpotConversations.widget.remove();
} else {
window.HubSpotConversations.widget.load();
}
}
If this approach doesn’t work, please share any details you can, as this helps the community to better assist you.
Best,
Jaycee
@Jaycee_Lewis I used the one below. This one is ideal for me. But how do I customize the popup and other types of forms like this?
useEffect(() => {
if (window.HubSpotConversations && window.HubSpotConversations.widget) {
window.HubSpotConversations.widget.refresh();
}
}, [history.location.pathname]);