Streaming live at 10am (PST)

Chatbot open on button click

Hi - I am trying to add a chatbot from snatchbot.io to my Webflow website and have it open when certain CTA buttons are clicked. I’d be grateful if someone could help me out.

The site on I am migrating to Webflow is still live on WordPress (creditloft.com) and you can see how the chatbot opens when the CTA button is clicked. I am looking to do exactly this on my Webflow site, while also having the bot automatically open when the page is scrolled.

Any advice is much appreciated!

This is something that could be included in their existing code, or you can create an open interaction.

Add your project share link to this thread.

1 Like

Currently, when one clicks on “Get Started”, the class of the chat element changes from wrapper hide to wrapper when one clicks on “Get Started.”

If, for some reason, @WebDev_Brandon’s solution doesn’t work for you (it should, it’s the best solution), you can use the following code to open the chat modal:

<script>

$('#btn').click(function () {

    $('#snatch-bot-window').addClass('wrapper').removeClass('wrapper hide');

});

</script>

This assumes that the div element that the modal is housed in remains the same when you migrate and that you give your button an ID of btn.

EDIT: Also — welcome to the forums! :slight_smile:

2 Likes

Thank you Matt! I wish I understood what most of that means… I’m working on it :slight_smile:

1 Like

@williamnobody, your best option would be to create an interaction element for On Click!

As for @mattvaru option, you could add this script code to your project and just add the ID of btn to that div element.

2 Likes

Don’t hesitate to PM me if you need it! Happy to help.

2 Likes