ActionLab Analytics for Docusaurus

Add privacy-first, AI-powered analytics to your Docusaurus site in under 60 seconds. No cookies, no consent banners, no complex setup.

Setup at a Glance

Add ActionLab to Docusaurus in 4 simple steps. Copy one script tag, paste it into your project, and start collecting privacy-friendly analytics immediately.

Category: Framework|4 setup steps|No cookies required

About Docusaurus

Docusaurus is Meta's documentation framework built on React, widely used for open-source project documentation, developer guides, and technical knowledge bases. Its Markdown-based content, versioning support, and search integration make it the standard for developer documentation. ActionLab integrates through the scripts configuration in docusaurus.config.js, providing documentation-focused analytics that help teams understand which docs are most read and where users struggle.

Why Add Analytics to Docusaurus

Documentation sites have unique analytics needs: understanding which docs are most read helps prioritize content maintenance, high bounce rates indicate confusing documentation, and navigation patterns reveal whether users can find what they need. ActionLab provides these insights with AI analysis that surfaces documentation-specific patterns. For open-source projects, the free tier covers documentation analytics at zero cost. The cookie-free approach is particularly appropriate for developer documentation, where visitors often use ad blockers and privacy tools that would block traditional analytics.

Installation Code

Docusaurus
// docusaurus.config.js
module.exports = {
  scripts: [
    {
      src: 'https://cdn.actionlabanalytics.com/actionlab.js',
      'data-site': 'YOUR_SITE_ID',
      defer: true,
    },
  ],
};

Step-by-Step Setup

  1. 1

    Open your docusaurus.config.js file in the project root.

  2. 2

    Add the ActionLab script to the scripts array using the object syntax with src, data-site, and defer properties.

  3. 3

    Replace YOUR_SITE_ID with your actual site ID from the ActionLab dashboard.

  4. 4

    Build and deploy. Docusaurus SPA navigation between docs is tracked automatically.

Why Use ActionLab with Docusaurus

  • Clean configuration via docusaurus.config.js scripts array — the standard Docusaurus way to add external scripts.
  • Track documentation page popularity to understand which topics users search for and read most.
  • AI insights analyze documentation usage patterns to identify which docs need updating, expanding, or better discoverability.
  • No Docusaurus plugin needed — the scripts configuration is simpler and avoids plugin version compatibility concerns.

Frequently Asked Questions

Can ActionLab track which docs are most read?

Yes. ActionLab shows top pages by traffic, time on page, and bounce rate, which directly translates to understanding documentation usage. You can see which documentation topics get the most views, which have high bounce rates suggesting confusing content, and which pages readers spend the most time on. The AI insights analyze these patterns to recommend documentation improvements, such as "Your API reference section has 3x higher bounce rate than tutorials — consider adding more code examples."

Does ActionLab track Docusaurus versioned docs?

Yes. Docusaurus generates different URLs for different documentation versions. Each version page is tracked individually, so you can compare traffic between documentation versions and identify which version your users primarily reference.

Does ActionLab work with Docusaurus search?

ActionLab does not integrate with Docusaurus search (Algolia DocSearch or local search) directly, but it tracks the pages that users navigate to after searching. The referrer and navigation data helps you understand user discovery patterns alongside your search analytics.

Can I track docs across multiple Docusaurus sites?

Yes. Each Docusaurus site can be set up as a separate site in your ActionLab account. The Enterprise plan supports unlimited sites, ideal for organizations with multiple documentation projects.

Is ActionLab free for open-source documentation?

The free tier with 100K events per month and 3 sites is available to everyone, including open-source projects. Most documentation sites fit comfortably within these limits. There is no special open-source pricing because the free tier itself is designed to serve documentation and smaller sites.