Mintlify
Add Databuddy's privacy-first analytics to your Mintlify documentation site by dropping a small databuddy.js file next to your docs.json. Mintlify auto-loads any .js file in your content directory on every page, so the tracker becomes available across all of your docs with zero per-page wiring.
There is no official Databuddy integration for Mintlify yet.
How to Add Databuddy to Mintlify
Get Your Client ID
Open your Databuddy dashboard, select the website that represents your docs, and copy the Client ID from the tracking setup screen.
Create databuddy.js
In your Mintlify project, create a new file named databuddy.js in the same directory as your docs.json.
(() => {
const script = document.createElement("script");
script.src = "https://cdn.databuddy.cc/databuddy.js";
script.setAttribute("data-client-id", "YOUR_CLIENT_ID");
script.crossOrigin = "anonymous";
script.async = true;
document.head.appendChild(script);
})();Replace YOUR_CLIENT_ID with the Client ID you copied from your dashboard.
Deploy Your Docs
Commit and push the new file to your repository:
git add databuddy.js
git commit -m "feat(docs): add databuddy analytics"
git pushMintlify rebuilds your docs on push and includes any .js file in your content directory on every page automatically. No extra changes to docs.json are required.
Verify Tracking
Open your published Mintlify site, then:
- Open your browser's DevTools and switch to the Network tab.
- Reload the page and confirm a request to
cdn.databuddy.cc/databuddy.jsreturns200. - Visit your Databuddy dashboard and watch real-time visitors appear.
Configuration Options
Enable extra tracking features by adding more data-* attributes when you create the script element.
(() => {
const script = document.createElement("script");
script.src = "https://cdn.databuddy.cc/databuddy.js";
script.setAttribute("data-client-id", "YOUR_CLIENT_ID");
script.setAttribute("data-track-attributes", "true");
script.setAttribute("data-track-outgoing-links", "true");
script.setAttribute("data-track-interactions", "true");
script.setAttribute("data-track-performance", "true");
script.setAttribute("data-track-web-vitals", "true");
script.setAttribute("data-track-errors", "true");
script.crossOrigin = "anonymous";
script.async = true;
document.head.appendChild(script);
})();See the full list of options in the SDK reference.
Custom Event Tracking
Mintlify renders MDX, so you can drop tracked elements directly into any .mdx page.
Using Data Attributes
<button data-track="cta_click" data-button-type="primary">
Get Started
</button>
<a href="/pricing" data-track="pricing_link_click" data-link-location="docs-header">
View Pricing
</a>Programmatic Events
Once the script has loaded, window.databuddy is available globally. You can call it from any inline <script> block in an MDX page or from your own custom script.
if (window.databuddy) {
window.databuddy.track("docs_search", {
query: "getting started",
page_path: window.location.pathname,
});
}Troubleshooting
Script not loading
- Confirm
databuddy.jsis at the project root, next todocs.json. - Make sure your changes are deployed. Mintlify only includes the script on the published site, not the local preview.
- Check the browser console and Network tab for blocked requests or 404s.
No data showing up
- Wait a minute or two for ingestion.
- Verify the domain on your Databuddy site matches the deployed Mintlify domain.
- Test in an incognito window to rule out ad blockers and previous opt-outs.
Related Integrations
Visual builder integration for Webflow sites with custom code embedding.
No-code integration for Framer websites with visual setup guide.
Plugin or manual setup for WordPress sites.
Need help with your Mintlify integration? Contact us at help@databuddy.cc.
How is this guide?