Install Foresite on Docusaurus
Docusaurus adds the scripts listed in its config to every page's <head>. In docusaurus.config.js (or .ts):
export default {
// ...the rest of your config
scripts: [{ src: 'https://t.foresite.dev/s/YOUR_SITE_ID.js', defer: true }],
}
Use the address from your own Foresite line (Settings → Install), then build and deploy. Keep defer: true, so the script doesn't hold up your pages.
Docusaurus switches pages without reloading; Foresite counts each page change as a pageview automatically. Visits to localhost aren't counted, so test on your published docs: the Installation Check in Settings → Install turns green with the first pageview.