Add Coursefinch to Drupal

There is no Drupal module yet. You add the script to your theme as a library, which is a small change for whoever looks after your theme.

A button on every page

  1. In your theme's THEMENAME.libraries.yml, add a library that loads the script from our server:
    coursefinch:
      js:
        https://app.coursefinch.co.uk/widget/coursefinch.js: { type: external, attributes: { defer: true, data-coursefinch-launcher: your-college } }
  2. In your theme's THEMENAME.info.yml, add this line to the libraries: list, so it loads on every page. If the file has no libraries: list, add one above it.
      - THEMENAME/coursefinch
  3. Clear the cache so Drupal picks up the change.

A box on one page

  1. Placing the box inside a page depends on your theme and text formats. Ask us and we will help your team with it.

Content Security Policy

If your website sets a Content Security Policy, allow these.

DirectiveValue to add
script-srchttps://app.coursefinch.co.uk https://challenges.cloudflare.com
connect-srchttps://app.coursefinch.co.uk
frame-srchttps://challenges.cloudflare.com
font-srchttps://app.coursefinch.co.uk

Check it is working

  1. Open a page of your website in a private browser window. The button appears in the bottom corner.
  2. Select it and ask a question about your college.
  3. If nothing appears, open the browser console. A Content Security Policy error means an entry above is missing.
  4. If your website combines, delays or moves scripts to make pages faster, leave this one out of that.

Sources

  • Drupal.org, Adding assets (CSS, JS) to a Drupal theme via *.libraries.yml (read 25 November 2026)

Documentation for IT teams