Use Code injection > Site footer to add Dinghy to your Ghost publication.
Get your tag
It's in the Dinghy operator app, under Settings > Install:
<script src="https://chat.example.com/widget/loader.js" data-key="wk_your_public_key" async></script>
Add your site to Allowed sites
In Dinghy, open Settings > Install and add your publication's address under Allowed sites, like https://blog.example.com. If readers also reach you at a ghost.io address, add that too.
Paste the tag
- In Ghost admin, open Settings.
- Go to Advanced, then Code injection.
- Paste the tag in the Site footer box.
- Save.
Ghost places Site footer code before the closing body tag. The Dinghy script downloads asynchronously.
Check that it works
Open your site in a private window, click the chat button and send a test message. It shows up in your Dinghy inbox.
No button? Open the browser's developer console. If loader.js failed, the address in the tag is wrong or a Content Security Policy blocks it. If the button shows but every message says "Not sent", add the exact address you're on to Allowed sites, www included. Troubleshooting has more.
Things to know
- Code injection is in Ghost's settings, not your theme. Switching or updating themes keeps the chat.
- Ghost also has code injection on single posts and pages. Use that if you only want the chat on, say, your pricing or contact page.
- If you run Ghost members, readers are anonymous in the chat unless your own server signs a token for them. Plain Ghost doesn't do that, so expect anonymous chats.
Next
- Change colors, the chat button and the words in Settings > Appearance. No code. The tag's
data-primaryanddata-accentwin over the setting. See Add the chat to your site. - For a plain chat button, add
data-launcher="bubble"or set it in Settings > Appearance.