Skip to content

Install the chat widget on any website

  1. In the agent app, open Settings > Website widget and copy the install code.

  2. Paste it just before the closing </body> tag on every page. If your pages share a footer template or include, paste it there once.

    Install code
    <!-- Click2Reply chat widget -->
    <script>
    window.__c2r = {"license":12345678};
    ;(function(w,d,n){if(w[n])return;var q=[],f=function(m){return function(){q.push([m,[].slice.call(arguments)])}};w[n]={_q:q,on:f("on"),once:f("once"),off:f("off"),call:f("call"),get:function(){throw new Error("[Click2Reply] get() is available after the widget loads")},init:function(){var s=d.createElement("script");s.async=!0;s.src="https://w.click2reply.com/w.js";d.head.appendChild(s)}};!(w.__c2r&&w.__c2r.async_init)&&w[n].init()})(window,document,"Click2Reply");
    </script>
    <noscript><a href="https://w.click2reply.com/page?license=12345678" rel="nofollow">Chat with our support team</a></noscript>
  3. Publish, then open your site: the chat button appears in the corner.

The widget keeps one chat across page changes on its own, so a site that swaps pages with JavaScript needs the code once, in the HTML shell, not on every route. See React, Next.js and Vue.

The chat button is the widget’s own. To open the chat from a link or button of yours, call Click2Reply.maximize() from its click handler; the widget API lists every method.