Repository navigation
Add Plausible analytics to docs - #123
Merged
Merged
Conversation
Load the same cookie-less Plausible script as flox.dev so /docs pageviews land in the flox.dev Plausible site. It only runs on the production hosts (flox.dev, www.flox.dev), so Mintlify previews aren't counted. It loads outside the HubSpot consent gate. Plausible sets no cookies, and gating it behind consent would miss the visitors we want to count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
tanjadev
approved these changes
Oct 15, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
A new root-level
plausible.js. Mintlify loads root.jsfiles on every page, the same way it loadsamplitude.jsandhubspot.js.What it does
flox.dev,www.flox.dev). Mintlify preview deployments aren't counted.#plausible-scriptis already on the page, and wraps everything in a try/catch so it can't break the docs.Checks
node --check plausible.js: passes.mint broken-links(via the repo's Flox environment): 3 broken/changelog/rss.xmllinks and anAGENTS.mdparse warning. Both are already onmainand have nothing to do with this change.mint validate: fails on the sameAGENTS.mdparse warning, with identical output onmain.How to verify after deploy
<script id="plausible-script">tag loading fromplausible.io./docs/...paths.Local browser test
Ran the docs dev server in headless Chrome with requests to flox.dev served locally, the real Plausible script loaded from plausible.io, and outgoing Plausible events captured locally (nothing sent to Plausible). No cookie banner interaction.
/→/man/flox)localhost)🤖 Generated with Claude Code