Add the Allinaa chatbot to a Ghost publication
Written by the Allinaa team · Updated
Ghost has a built-in place for site-wide scripts called code injection, and the Allinaa assistant is one paste into its site footer field. This guide says what Ghost's own page confirms about code injection, marks the menu names it does not confirm, and is honest about one more thing we could not confirm: which Ghost(Pro) plans include it.
Code injection, as Ghost describes it
Ghost's changelog entry on code injection says the feature injects code snippets into a theme's ghost_head and ghost_foot helpers, and that you can change themes without losing them. It names no menu path and no field names. In Ghost Admin, look in Settings for Code injection, with a site header and a site footer field; Ghost's tutorial names these exactly, so they should match your admin. The footer field, the one that fills ghost_foot, is the right one for the chat: the page content comes first, the assistant after it.
Get your code
You need your own code first. Sign up at bot.allinaa.com/start for the 14-day free trial, confirm your e-mail and follow the setup wizard; step 5, "Install", shows one line:
<script src="https://bot.allinaa.com/widget.js" data-bot-id="your-bot-id" defer></script>Step by step
- Open Ghost Admin and go to Settings.
- Open Code injection; if the setting is named differently in your version, check in your platform's help.
- Paste your code into the site footer field and save.
- Open your publication in a private window and look for the chat button. Ghost's tutorial does not describe a further step after saving; if the button is not there, check in your platform's help.
Ghost(Pro) plans and self-hosting
We could not confirm whether the Ghost(Pro) Starter plan includes code injection, so this page does not claim it either way: if the Code injection setting is missing in your Ghost Admin, check in your platform's help for your plan. On a Ghost site you host yourself, code injection is part of Ghost itself, as the changelog describes it.
Posts for members
The assistant answers from the knowledge you approve, not from the post it sits on, and its page-aware answers use the visible text of the page where it is loaded. On a publication with paid posts, keep in mind that a member reading a paid post can ask the assistant about that page, like about any page; the assistant does not store the post.
Check the installation
Check from both sides. As a visitor: open the live site in a private window, look for the button in a bottom corner and open a second page, so you know it is not limited to one. From Allinaa: click Check my site in the cabinet; it reads your homepage and up to two linked pages and answers found, not found or unreachable. The status also turns to installed by itself the first time the assistant loads on a page of your site.
Running a theme with its own footer code box? Code injection is the simpler place, because Ghost's page says the snippets survive a theme change. More on updates on the troubleshooting page.
Frequently asked questions
Where does the Allinaa code go in Ghost?
Ghost Admin, Settings, Code injection, the site footer field. The Ghost page we cite confirms the feature and its footer helper, not these menu names; if yours differ, check in your platform's help.
Does the Ghost(Pro) Starter plan include code injection?
We could not confirm it. If the setting is missing in your admin, check in your platform's help.
Does a theme change remove the code?
No. Ghost's page says you can change themes without losing the snippets.
Header or footer field?
Footer. The header also works because the script is deferred, but the footer keeps the page content first.