Install guide: Drupal

Add GetFoxChat to your Drupal site

As of November 3, 2026, to add GetFoxChat to Drupal, 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 (Drupal's own guide, September 30, 2026). The video on this page shows GetFoxChat installed, tested and running in 4 minutes (watch it).

Before you start: Access to your site's theme files (a developer or host file access); Drupal core has no admin screen for pasting site-wide scripts. source

Watch it first

GetFoxChat being installed, tested and run on a real site▶ Watch how
Install, test and run GetFoxChat in 4 minutes

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>

How do you add GetFoxChat to Drupal, step by step?

  1. 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.
  2. Open your active theme's folder and its THEMENAME.libraries.yml file (create it if missing). source
  3. Add a library, for example getfoxchat, with a js entry for https://getfoxchat.com/widget.js marked type: external. source
  4. Under that js entry, add attributes: defer: true and data-site-id: YOUR SITE ID, which Drupal copies onto the script tag. source
  5. Open THEMENAME.info.yml and add THEMENAME/getfoxchat under the libraries key, so it is available to every page presented by the theme. source
  6. Clear the Drupal cache, then load any page and check that the chat bubble shows.
  7. 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

How do you remove 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.

Your AI Operator starts as Foxy. Rename it and give it your own avatar in Settings. Plans and what each includes: pricing.