Add GetFoxChat to your SvelteKit site
As of November 15, 2026, to add GetFoxChat to SvelteKit, in src/app.html, the page template for every page, just before </body> and after the element that holds %sveltekit.body% (SvelteKit's own guide, September 30, 2026). The video on this page shows GetFoxChat installed, tested and running in 4 minutes (watch it).
Watch it first
▶ Watch how
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>
On SvelteKit, this is what goes in src/app.html:
<script src="https://getfoxchat.com/widget.js" data-site-id="YOUR_SITE_ID" defer></script>
How do you add GetFoxChat to SvelteKit, 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 src/app.html, the page template every SvelteKit app has. source
- Find the element that wraps %sveltekit.body% and paste the GetFoxChat line after it, just before </body>. source
- Replace YOUR_SITE_ID with your site ID.
- Rebuild and redeploy the app.
- Back in GetFoxChat, press Check my site. The chat switches on once GetFoxChat finds the snippet on your live pages.
SvelteKit's own guide: SvelteKit docs: Project structure. Checked 2026-09-30; if SvelteKit renames a menu, its guide has the current wording.
SvelteKit gotchas
- Keep %sveltekit.body% inside its own div; do not move it or put the script inside that div, which SvelteKit replaces with the rendered page. source
- If your site sends a Content Security Policy with nonces, add nonce="%sveltekit.nonce%" to the script tag. source
- app.html is required in every project, so it is always there even if you never edited it. source
How do you remove it later?
Delete the GetFoxChat script line from src/app.html, then rebuild and redeploy.
Checked against the current SvelteKit docs (SvelteKit 2).
Watch it take a visitor there
Find out what your visitors can't find
Type your website's address. GetFoxChat reads up to ten of your public pages and shows the GetFoxChat AI Operator answering three questions from them, with the page each answer came from. No account, nothing to install.
Like it? Press Put this on your site in the preview: you get a free account with the site already set up. Plans and what each includes: pricing.