Skip to content

Install the chat widget with Tag Manager

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

    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>
  2. In your Tag Manager container, create a new tag of type Custom HTML and paste the code.

  3. Set the trigger to All Pages.

  4. Submit and publish the container.

Use Preview first to check the tag fires: the chat button appears on your site in the preview window.

To load the chat only after a visitor consents, keep the tag and give it a consent trigger, or fire it from your consent tool’s event instead of All Pages. The widget loads as soon as the tag fires, on the page where the visitor consented.

If your organization’s cookie-consent setting is on, keep the tag on All Pages instead and add a second Custom HTML tag that runs <script>Click2Reply.call("set_cookie_consent", true);</script>, with a trigger that fires on every page where consent is granted, the page of the consent event included. The chat works from the first page, and remembers the visitor across pages once consent is in place.