Before you start
You need your embed code from Dashboard → Widget → Install & security. It has your own site key filled in and looks like this:
<script src="https://api.apexbot.eu/widget.js" data-site-key="apex_pk_…" async></script>Add your website as a knowledge source first, so the assistant has something to answer from the moment it appears. On WordPress.com, adding code or plugins needs a plan that allows plugins; self-hosted WordPress has no such limit.
Option 1: a code plugin (recommended)
A header and footer plugin keeps the snippet safe from theme updates and works with every theme.
- In your WordPress admin, go to Plugins → Add New, search for WPCode, then install and activate it.
- Open Code Snippets → Header & Footer.
- Paste the embed code into the Footer box and click Save Changes.
- Open your site in a new tab. The chat launcher appears in the corner you chose.
Option 2: your theme
With a classic theme, go to Appearance → Theme File Editor, open footer.php and paste the snippet just before </body>. Use a child theme, or the snippet disappears the next time the theme updates. Block themes don't have a footer.php; use the plugin option instead.
Allow your domain
Under Allowed websites add every address visitors use, for example https://example.com and https://www.example.com. The widget only runs on the addresses listed, so a copied snippet does nothing on someone else's site.
WooCommerce
WooCommerce stores install the same way. Make sure your shipping, returns and payment pages are part of the knowledge source, and add a text source for anything they don't cover. See Apex for e-commerce for what works well in a store.
Troubleshooting
- The launcher doesn't show. Open the browser console.
[Apex] Widget disabled: origin_not_allowedmeans the exact address, includingwwwandhttps, is missing from Allowed websites. - It worked, then stopped after a cache plugin. Clear the cache. If you use JavaScript “delay” or “combine” features (WP Rocket, LiteSpeed Cache, Autoptimize and similar), exclude
widget.jsfrom them. - It shows on pages where it shouldn't. Add those paths under Behavior → Hide on these pages.
More in the docs.