Add the Dinghy tag with a header and footer plugin or your child theme.
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>
Then add your site under Allowed sites in Settings > Install, like https://www.example.com. If people also visit without www, add that too.
Use a header and footer plugin
If you already have a plugin that adds code to your header and footer, like WPCode, use it. If not, install one from Plugins > Add New.
- Open the plugin's header and footer settings.
- Paste the Dinghy tag in the footer box, the one that prints before
</body>. - Save.
Open your site in a private window. The chat button should be in the corner.
Use your child theme
If you have a child theme, add this at the end of its functions.php. It prints the tag in the footer of every page:
add_action('wp_footer', function () {
echo '<script src="https://chat.example.com/widget/loader.js" data-key="wk_your_public_key" async></script>';
});
Use a child theme, not your main theme. A theme update replaces the main theme's files and your change is gone.
WordPress.com
On WordPress.com, the Dinghy tag needs a plugin-enabled plan with hosting features activated. Self-hosted WordPress lets you add the tag with a plugin or child theme.
Check that it works
- Open your site in a private window.
- Click the chat button and send a test message.
- Check that the message appears in your Dinghy inbox.
No button? A caching plugin may be serving the old page, so clear its cache. Still missing? 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.
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. - If your site has accounts, you can show which logged-in user is chatting. See Show who is chatting.