How to Launch a chat with a button

  • 23 February 2022
  • 3 replies

Userlevel 1


Is there a good way to launch a popup chat with a button - this is what I mean: 



Best answer by mathio 24 February 2022, 19:24

View original

3 replies

Userlevel 7
Badge +5

Hi @AdamMktgTy Welcome to the community! You would need to use some custom code to do this, but @mathio or @picsoung might have an example of this for you!

Userlevel 7
Badge +5

In your share page you can get embed snippet for popup:

Then add data-tf-chat to your embed code like this (part of the code truncated):

<button data-tf-chat data-tf-popup="<form-id>" ...>Launch me</button>
<script src="//"></script>



If you want to build your own button from scratch you can use our Embed SDK. If you want full control over your embed you can build it in JavaScript. The code would look something like this:

<button id="my-awesome-button" class="my-awesome-class">open form</button>
<script src="//"></script>
<link rel="stylesheet" href="//" />
const { toggle } ='<form-id>')
document.querySelector('#my-awesome-button').onclick = toggle


Userlevel 7
Badge +5

@AdamMktgTy let us know if @mathio ‘s solution worked for you!