Add GetFoxChat to your Drupal site
Declare the GetFoxChat script as an external library in your theme's THEMENAME.libraries.yml and list that library under libraries in THEMENAME.info.yml, so Drupal loads it on every page the theme shows. The line loads the GetFoxChat chat bubble on every page, and the operator behind it answers your visitors from your own public pages.
The line to add
Yours has your own site ID in place of YOUR_SITE_ID.
<script src="https://getfoxchat.com/widget.js" data-site-id="YOUR_SITE_ID" defer></script>
Add GetFoxChat to Drupal, step by step
- In GetFoxChat, open the install step for your site and copy your snippet. It already has your site ID in it. No account yet? Create one free.
- Open your active theme's folder and its THEMENAME.libraries.yml file (create it if missing). source
- Add a library, for example getfoxchat, with a js entry for https://getfoxchat.com/widget.js marked type: external. source
- Under that js entry, add attributes: defer: true and data-site-id: YOUR SITE ID, which Drupal copies onto the script tag. source
- Open THEMENAME.info.yml and add THEMENAME/getfoxchat under the libraries key, so it is available to every page presented by the theme. source
- Clear the Drupal cache, then load any page and check that the chat bubble shows.
- Back in GetFoxChat, press Check my site. The chat switches on once GetFoxChat finds the snippet on your live pages.
Drupal's own guide: Drupal.org docs: adding assets to a Drupal theme via libraries.yml. Checked 2026-09-30; if Drupal renames a menu, its guide has the current wording.
Drupal gotchas
- Drupal only loads a script when a library tells it to, so pasting the tag into a block or text field is not the way; use the theme library. source
- Library scripts load in the footer by default, which suits GetFoxChat; do not set header: true. source
- If you give the library a version, change it whenever you edit the entry, or browsers and edge caches may keep the old version. source
- Inline script tags are discouraged in Drupal; the library method keeps the GetFoxChat line compatible with a strict Content Security Policy. source
Removing it later
Delete the getfoxchat line from the libraries key in THEMENAME.info.yml (and the library from THEMENAME.libraries.yml), then clear the Drupal cache.
Applies to Drupal 8 and later (9, 10, 11). drupal.org serves a bot challenge to scripted fetches, so all quotes were read from the fully rendered page in a browser on 2026-09-30 and are marked webfetch. The page writer can show the libraries.yml entry as a code block: a library key, js, the widget URL, type external, attributes with defer true and data-site-id. If the site uses a contributed theme, the change belongs in a custom sub-theme so theme updates do not wipe it (not claimed from docs). Contributed modules that paste scripts from the admin UI exist but are not covered by these official docs.
Find out what your visitors can't find
See the 5 questions your visitors are likely to ask that your pages don't clearly answer. Free, no account needed.
The chat starts as Foxy. Rename it and change the avatar anytime. Plans and what each includes: pricing.