Add GetFoxChat to your React (Vite or Create React App) site
As of November 3, 2026, to add GetFoxChat to React (Vite or Create React App), in the single HTML file of the app, just before </body>: index.html at the project root for Vite, or public/index.html for Create React App (React (Vite or Create React App)'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 React (Vite or Create React App), this is what goes in index.html (Vite) or public/index.html (Create React App):
<script src="https://getfoxchat.com/widget.js" data-site-id="YOUR_SITE_ID" defer></script>
How do you add GetFoxChat to React (Vite or Create React App), 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.
- Vite project: open index.html in the project root. Vite keeps it there, not inside the public folder. source
- Create React App project: open the HTML file in the public folder (public/index.html). source
- Paste the GetFoxChat line just before </body> and replace YOUR_SITE_ID with your site ID. source
- Run your production build (vite build, or npm run build for Create React App) and redeploy the output. source
- Back in GetFoxChat, press Check my site. The chat switches on once GetFoxChat finds the snippet on your live pages.
React (Vite or Create React App)'s own guide: Vite docs: index.html and Project Root. Checked 2026-09-30; if React (Vite or Create React App) renames a menu, its guide has the current wording.
React (Vite or Create React App) gotchas
- In Vite, index.html is the entry point of the app and is treated as source code, so edit the root index.html, not a copy in the build output. source
- If your Vite app has several .html entry points, add the line to each one. source
- Create React App adds its own compiled script tag during the build; leave that alone and only add the GetFoxChat line. source
- Create React App serves the result from the build folder, so the change only goes live after a new build is deployed. source
How do you remove it later?
Delete the GetFoxChat script line from index.html, rebuild, and redeploy.
Covers client-side React apps built with Vite or Create React App. For Next.js, Gatsby or other React frameworks use their own guides.
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.