Add live chat to Google Tag Manager

Add the snippet as a Custom HTML tag on All Pages and publish the container.

Steps

  1. 1
    TagsNewTag ConfigurationCustom HTMLCreate a new tag.
  2. 2
    Paste the snippet in the HTML box.
  3. 3
    Under Triggering, choose All Pages, then Save.
  4. 4
    Click Submit, then Publish: the tag only runs once the container version is published.
HTML, before </head>
<script>
  (function(w,d,s,o){
    w.MuroChat=o;w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};
    var j=d.createElement(s);j.async=1;j.src='https://muro.chat/widget.js';
    d.getElementsByTagName('head')[0].appendChild(j);
  })(window,document,'script','muro');
  muro('init',{widgetId:'wgt_…'});
</script>
  • A consent banner that blocks GTM tags until opt-in also delays the chat until then.

Replace wgt_… with your site's widget ID. Your muro dashboard shows this same code with the ID already filled in. Script source: https://muro.chat/widget.js.

Check that it works

Open your site in a private window: the chat bubble shows in the bottom corner within a few seconds. In muro, the site page turns green as soon as a browser loads the widget, and the Check installation button tells you what is wrong if it does not: snippet missing, another site's widget ID, a Content-Security-Policy that blocks muro.chat, or a cache that still serves the old page.

Free on one site, no card. Your snippet is ready as soon as you add the site.

Get your snippet

Other platforms