← All posts
Integrations5 min read

[INTEGRATIONS] · Jun 21, 2026 · 11:39

How to add live chat to a Ghost blog (Code injection, no theme edits)

Paste one script into Ghost Admin under Settings, Code injection, and a chat bubble loads on every post and page. No theme files, no plugin, no rebuild.

Tm

The muro team

muro.chat

#ghost#live chat#install#code injection#byok
How to add live chat to a Ghost blog (Code injection, no theme edits)

You publish on Ghost because it stays out of your way. So the last thing you want for reader questions is a heavy plugin, a theme fork, or a Handlebars edit you have to redo every time you change themes. The good news: Ghost has a built-in spot for exactly this, and you never touch a template file.

This guide walks through adding live chat to a Ghost blog using Code injection, the official place Ghost gives you to drop scripts site-wide. It works the same on Ghost(Pro) and a self-hosted install, on free and paid themes, because the code lives in your site settings, not in the theme. By the end you will have a chat bubble on every post and page, and an AI that can answer from the posts you already wrote.

Why Code injection is the right place

Ghost themes are Handlebars templates. You could edit default.hbs and add a script before the closing body tag, but then your chat widget is tied to that one theme. Switch themes or take a theme update and your edit is gone. Code injection sidesteps all of that. Anything you paste into the Site Header or Site Footer field is rendered on every page Ghost serves, including every post, every static page, the home page, and tag and author archives, no matter which theme is active.

  • Survives theme changes and updates, because it is stored in your site settings.
  • Loads on the whole publication at once, so you set it once and forget it.
  • No FTP, no SSH, no rebuild. You edit it from the browser in Ghost Admin.
  • Reversible in seconds: clear the field and save to remove it.

Get your widget snippet

First grab the snippet you will paste. Create a free workspace, open your dashboard, and copy your widget id. Then use the snippet below and replace YOUR_WIDGET_ID with that id. If you want to see the bubble in action before you install anything, try the live demo first.

html<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:'YOUR_WIDGET_ID'});
</script>

It is about 6 KB, loads asynchronously after your page paints so it never slows your reading experience, and runs inside a Shadow DOM so it cannot collide with your theme's CSS or fonts.

Paste it into Ghost Admin

Now the actual install. Every step happens inside Ghost Admin in your browser:

  1. 01In Ghost Admin, click the gear icon, then open Settings.
  2. 02Scroll to the Advanced group and select Code injection (on older Ghost versions it sits directly under Settings).
  3. 03You will see two boxes: Site Header and Site Footer. Paste the snippet into Site Header.
  4. 04Click Save in the top right.
  5. 05Open your live blog in a new tab and do a hard refresh. The chat bubble appears in the corner on every post and page.

Confirm it loaded

If the bubble does not show, open your browser dev tools, go to the Network tab, refresh, and look for widget.js. A 200 means the script reached your page and the widget id is being read. The two things that trip people up: pasting the snippet but forgetting to hit Save, or leaving YOUR_WIDGET_ID as the literal placeholder instead of your real id from the dashboard.

Make the AI answer from your posts

Here is where a blog gets real leverage. Most reader questions are things you already answered in an earlier post. Turn on AI auto-reply and point it at your publication URL, and the agent grounds its answers on your published posts and pages. A reader asking "do you have anything on X" gets a direct answer with the link, instead of waiting on you. When the AI is not sure, it hands the conversation to you with the full context attached, so you only step in when it actually matters.

The piece that keeps this affordable for a writer is BYOK: bring your own LLM key and the AI runs unlimited at zero markup, so a post that takes off does not turn into a surprise bill. If you would rather not manage a key, the managed option is a simple monthly credit pool, no per-resolution fees. Here is the full story on why AI support gets expensive and how bringing your own key fixes the math.

One inbox, even if you run more than one blog

Plenty of writers run a couple of Ghost sites plus a landing page somewhere else. Paste the same kind of snippet on each, give each its own widget id, and every reader message lands in one shared inbox. You answer from a single place instead of hopping between tabs, at one flat price rather than paying per site or per seat. See the flat pricing or just start free and have the bubble live on your blog in the next few minutes.

That is the whole install: one snippet, one field in Ghost Admin, one Save. No theme edits to maintain, nothing to redo when you switch themes, and an AI that already knows what you have written.

✦ Try it

One support inbox for all your projects, one flat price.

muro is live chat, an AI that answers from your own docs, and a shared inbox for every site you run. See it both sides in the live demo, check the flat pricing, or see how muro compares. It's the same snippet on every platform — browse every install guide.

Tm

✎ Written by

The muro team

muro.chat