1

I'm moving from PureChat to Smooch. I used to have a link on my WordPress site that, when clicked, would open a PureChat widget. It looked like this:

<a href="javascript:void()" class="purechat-button-expand">Text</a>

Now I'd like to achieve the same thing with the Smooch web messenger:

  1. User clicks links
  2. Smooch chat widget opens

... can you help me figure it out?

1
  • can you please send me a your website url?So I can get idea. Nov 16, 2016 at 13:00

2 Answers 2

2

Assuming you already ran Smooch.init({...}) before and properly initialized the Web Messenger, you can then simply have a link like this :

<a href="javascript:Smooch.open()">Text</a>

You can find more information about what you can do with the library on the Github repo

1

You can call chat Button on link click,

    $(function () {


    $(document).on("click", "#anchorId", function () {
        $("#sk-messenger-button").click();
    });
});

sk-messenger-button button id on website of https://smooch.io/.

In other-way,

$("#sk-messenger-button").click();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.