ChatRaj
AI chatbot for Ghost

Add an AI chatbot to Ghost in 60 seconds, one script tag

ChatRaj trains itself on your published Ghost content, embeds via Code Injection, and converts chat conversations into newsletter signups. Works on Ghost(Pro) and self-hosted Ghost.

Read install steps
Bottom line
Adding an AI chatbot to Ghost takes about 60 seconds and works on every Ghost plan including the lowest Ghost(Pro) Starter tier. Open Settings, Advanced, Code Injection, paste one script tag into the Site Footer field. ChatRaj answers visitor questions using only the content from your Ghost publication, captures newsletter signups, and works on every theme including the default Casper.
Reviewed by ··10 min read
Jump to section

The 60-second Ghost chatbot path

Ghost has a single canonical install path for third-party scripts: Settings, Advanced, Code Injection. It's the same on Ghost(Pro) hosted and on self-hosted Ghost, and it's available on every Ghost tier including the entry Starter plan. The install takes about 60 seconds.

The chatbot snippet is one line:

html
<script async src="https://chatraj.com/widget.js" data-bot-id="YOUR_BOT_ID"></script>

Inside your Ghost admin panel, click your account icon (bottom-left), then Settings, then Code Injection (under the Advanced section). Paste the script tag into the Site Footer field. Hit Save. The chatbot bubble now appears in the bottom-right corner of every page of your Ghost publication within seconds.

That's the whole integration. No Ghost integration to install, no permission scope to grant, no theme template edit, no Node.js helper to deploy alongside Ghost. The widget loads asynchronously after your page renders, never blocks Largest Contentful Paint, and shows up on every page including your homepage, every post, tag pages, author pages, and your member signup or login screens.

Why Ghost is different from other CMS platforms

Most CMS integrations in this series share a common shape: build a marketing site, install a chatbot, answer visitor product questions. Ghost is different because the buyer is usually a publisher rather than a marketer. The site IS the product: posts, newsletters, paid subscriptions, member-only content. Visitors come to read, not to buy a SaaS subscription or browse products.

That changes what ChatRaj optimizes for on Ghost:

  • Content discovery. Visitors land on one post via search or social, the chatbot helps them find related posts in your archive ("Have you written anything about email deliverability?"). The bot indexes your full Ghost archive and pulls deep cuts.
  • Newsletter signup conversion. When a visitor finishes a post and asks a follow-up question, the bot can answer AND offer them the newsletter at the same moment. Captured emails flow to a CSV or a webhook (Ghost's Members API integration is on our roadmap).
  • Member tier guidance. Visitors on free tiers asking about paid-only content can get a "this post is members-only, here's the signup page" answer pointing at your Ghost Members page.

The bot does NOT replace Ghost's own newsletter and membership flows. It complements them.

Where Code Injection lives in Ghost

Ghost's Code Injection panel exposes two slots and a per-post option:

Site Header. Injects code into the document head on every page. Useful for tracking scripts that must run as early as possible (analytics, consent layers). NOT recommended for the chatbot loader; use Site Footer instead.

Site Footer (recommended). Injects code right before the closing body tag on every page. This is the correct placement for the ChatRaj loader. Performance-friendly, async-safe, and matches the standard convention for embedded chat widgets.

Per-Post Code Injection. The Ghost editor has a sidebar option for code injection on individual posts. Same Header/Footer split as the site-wide version. Use this only if you want the bot on specific posts and not the rest of the site (uncommon for chatbots; site-wide is the default expectation).

For the chatbot install, paste into Site Footer. Done.

Will it work on Casper and other Ghost themes?

Yes. ChatRaj's widget is an iframe rendered above all your site content via z-index 2147483647 (the maximum 32-bit signed integer, so no other element on the page can sit on top of it accidentally). It does not import any CSS into your Ghost theme, does not add classes to your body element, and does not load fonts that conflict with your theme's typography.

We've verified the script on Casper (Ghost's default theme), all official Ghost themes (Edition, Headline, Source, Wave, Bulletin, London, Dawn, Solo, Massively), and on the most-installed third-party themes from the Ghost Marketplace (Ease, Liebling, Editorial, Bulletin Lite, Krabi). The widget renders correctly above sticky headers, full-bleed featured images, post embeds (Twitter, YouTube, Spotify), and Ghost's native member modal.

The only conflicts we've seen are a handful of heavily-customized themes that override z-index on the body element for full-screen overlays (unusual; most Ghost themes don't touch root-level z-index). The fix is a one-line CSS override added via Code Injection, Site Header, as a style tag: <style>#chatraj-iframe { z-index: 2147483647 !important; }</style>. If you hit this, ping support.

Lead capture for newsletter-first publications

The big lead-capture pattern on Ghost is newsletter signup. ChatRaj's approach:

When a visitor asks the chatbot a question and the bot finishes answering, the bot can offer the newsletter as a natural follow-up: "Want more posts like this delivered weekly? Drop your email and I'll subscribe you." If the visitor agrees, the bot captures the email and sends it to your configured webhook or CSV export.

For Ghost specifically, the captured email flows can go to:

  • Ghost Members API (planned native integration). Direct signup to your Ghost Members list, no manual step. This is on our roadmap; in the meantime, the Zapier path below works.
  • Zapier. Configure ChatRaj's webhook URL to point at a Zapier hook, and Zapier routes new signups into Ghost Members via Ghost's Admin API. Several Ghost-specific Zapier templates already exist.
  • Mailchimp / ConvertKit / Substack import. Many Ghost publishers double-publish to a separate ESP. The CSV export lets you import captured leads to whichever ESP you also use.

The captured email is not locked into ChatRaj. Export anytime, push via webhook, or wire it directly to Ghost Members once we ship the native integration.

What about member-only content?

ChatRaj's crawler reads public URLs only. Member-only content (posts behind Ghost's member or paid tier) is not crawled, so the bot cannot answer from gated content. This is by design: the crawler is anonymous, and Ghost correctly serves the public preview or paywall page to anonymous visitors, not the gated content itself.

For publications where the bulk of the value is in paid-member posts, this is a real limitation. Two patterns work around it:

  1. Public preview content per post. Most Ghost paywalled posts have a public lede or summary visible above the paywall. ChatRaj indexes that public portion, so the bot can answer "yes, we covered that in our March issue, here's the link" even if it can't quote the full post body.
  2. Free-tier deep archive. Many Ghost publishers keep their oldest content free and gate only recent posts. The free archive becomes the bot's knowledge base, and the bot points visitors at the paid signup for newer content.

If your entire publication is members-only with zero public content, ChatRaj is not the right fit; in that case the bot has nothing to train on.

Self-hosted Ghost vs Ghost(Pro)

Code Injection works identically on Ghost(Pro) (Ghost's hosted offering) and on self-hosted Ghost installations. The Settings, Advanced, Code Injection panel is in the same place, and the Site Footer field accepts the same script tag with no platform-specific modifications.

For self-hosted operators specifically: if you've configured your Ghost instance behind a reverse proxy (NGINX, Caddy, Cloudflare) or with a custom caching layer, the chatbot script will reach the visitor's browser unchanged. The script tag flows through your reverse proxy as ordinary HTML. There's no special routing or proxy configuration required for chatraj.com.

For teams that compile their Ghost theme from source (the "headless Ghost" pattern with a Gatsby or Next.js front-end), the chatbot install moves to wherever your front-end stack injects the rendered HTML. See the /for/html guide for framework-specific install paths. In headless setups, ChatRaj's training Sources should still point at your Ghost API (or your headless front-end's published URLs), so the bot trains on the same Ghost content even when the rendering layer is a separate front-end stack.

For Ghost publishers on Ghost(Pro): the integration works identically to self-hosted, and Ghost(Pro)'s Cloudflare caching layer correctly invalidates pages containing your Code Injection script when you Save the panel. You don't need to manually purge the cache. The next page-load on a non-cached request picks up the new script tag, and within seconds the floating bubble appears across your publication.

Multi-language Ghost publications

If you run a multi-language Ghost publication (Ghost doesn't have built-in multi-language support, so this typically means publishing translated posts manually or running parallel Ghost instances), ChatRaj auto-detects the visitor's language from their first message and replies in the same language. No configuration needed.

If your Ghost publication is primarily one language with occasional foreign-language readers (typical for indie newsletters), the auto-detect works naturally without configuration. If you want to lock the bot to a single language regardless of visitor input, set a Force response language in the ChatRaj Settings.

GDPR for EU Ghost publishers

ChatRaj never trains models on your visitors' chat logs and never shares visitor data across customers. Each bot is fully isolated by chatbot_id; the only data we store about visitors is a random visitor_id cookie (used to give conversation continuity across page loads) and the messages they send.

For GDPR compliance on EU traffic, ChatRaj signs a Data Processing Agreement (DPA) with every paid customer. Visitor consent for the chat widget should fold into your Ghost site's existing cookie consent flow. Ghost doesn't ship a built-in cookie banner; most publishers add one via Code Injection (Cookiebot, Iubenda, Termly, OneTrust) and configure it to delay third-party scripts until consent is granted.

The chatbot's cookie (a random visitor_id for conversation continuity) falls under functional cookies in most jurisdictions and does not require explicit opt-in beyond the standard "accept" path.

When you should NOT use ChatRaj on Ghost

A few honest signals that ChatRaj might not be the right fit for your Ghost publication:

  • Your entire publication is members-only with zero public content. The bot has nothing public to train on.
  • You're running a publication with fewer than 100 monthly readers. At that volume the chatbot's value is hard to justify against your time setting it up. Focus on growing the audience first via SEO, social, or cross-promotion.
  • You need the chatbot to manage Ghost Members directly (add tags, modify subscriptions, send transactional emails). ChatRaj is content-grounded; member-management belongs to the Ghost Admin API side, which we plan to integrate via webhook later in 2026, alongside the native newsletter signup path.

For everyone else, especially indie newsletter operators looking for a low-cost way to convert chat conversations into newsletter signups, the 60-second install path is real, and the free ChatRaj tier is enough to confirm whether the bot's answers from your Ghost content are good enough before you spend a dollar on either Ghost(Pro) or ChatRaj.

Install guide

Install on Ghost

7 steps. Most operators finish in 60 seconds.

  1. Create a ChatRaj account

    Head to chatraj.com/signup and sign in with Google. Free tier, no credit card. You'll land on the dashboard.

  2. Create your first chatbot

    Click 'New chatbot', give it a name (e.g. 'Newsletter Bot'), and confirm. The bot is created in a 'pending' state until you add training sources.

  3. Add your Ghost publication as a source

    On the Sources tab, paste your Ghost publication URL. ChatRaj crawls up to 20 pages by default. Submit your sitemap URL instead (Ghost generates one automatically at yoursite.com/sitemap.xml) if you want every post, tag page, and author page indexed.

  4. Customize the look

    On the Customize tab, pick a theme color that matches your Ghost publication's brand, set a welcome message visitors see when they first open the chat, and add 3-4 suggested questions (e.g. 'What do you write about?', 'How do I subscribe?', 'Show me your best posts on X'). Save.

  5. Copy your embed snippet

    On the Embed tab, copy the Script tag option. It looks like: <script async src="https://chatraj.com/widget.js" data-bot-id="YOUR_BOT_ID"></script>

  6. Paste the snippet into Ghost Code Injection Site Footer

    Open your Ghost admin panel, click your account icon (bottom-left), then Settings, then Code Injection (under Advanced). Paste the script tag into the Site Footer field. Hit Save.

  7. Verify the bubble appears

    Open your Ghost publication in an incognito window. Within 1-2 seconds, a floating chat bubble appears in the bottom-right corner. Click it. Send a test message. The bot answers using content from your Ghost posts. Done.

ChatRaj on Ghost

Plugin approach vs ChatRaj approach

What you'd otherwise stitch together from a chatbot plugin + a separate analytics tool + a lead-capture tool, ChatRaj bundles by default, and ships in a single script tag.

The plugin approach

Other Ghost chatbot tools

Typical when you install a WordPress plugin, Shopify app, or third-party chatbot widget.

  • Install method: Marketplace integration (Ghost has limited chatbot integrations)
  • Ghost plan requirement: Same: Code Injection available on every tier including Starter
  • Page-load impact: Varies
  • Member-only content: Generally same: anonymous crawlers can't see gated content
  • Newsletter signup capture: Often a paid add-on or higher-tier feature
  • Multi-language: Often paid add-on
  • Self-hosted Ghost support: Some require Ghost(Pro) only
  • Setup time: Varies
The ChatRaj approach

One script tag. Everything bundled.

Hosted, configured, and maintained by us. You add a single line to your site.

  • Install method: Script tag in Code Injection (the standard Ghost pattern)
  • Ghost plan requirement: Same: Code Injection available on every tier
  • Page-load impact: Small async loader, no LCP impact
  • Member-only content: Same: bot reads public content only; gated posts not crawled
  • Newsletter signup capture: Built in on all plans; CSV + webhook to Ghost Members via Zapier
  • Multi-language: 100+ languages auto-detected on all plans
  • Self-hosted Ghost support: Works identically on Ghost(Pro) and self-hosted
  • Setup time: 60 seconds
FAQ: ChatRaj on Ghost

Common Ghost chatbot questions

Yes. Code Injection is available on every Ghost(Pro) tier, starting from the entry Starter plan. The Site Footer field accepts the ChatRaj script tag with no plan upgrade required. ChatRaj's own free tier still works on top of any Ghost plan.

Was this helpful?

Ship your first chatbot in 60 seconds.

Sign in with Google and you'll be answering visitor questions before your coffee gets cold.

60-second setup · One-line install · Works on any site

Works on any website
SShopify
WWebflow
WPWordPress
SqSquarespace
FFramer
</>Plain HTML