Docs platform

Install Hitsteps on Docusaurus

Add one line to your Docusaurus config and every docs page a reader opens shows up in Hitsteps as its own page, in the order they read them, including when they go Back.

Before you start

A Hitsteps account or willingness to create one during setup
Access to your Docusaurus config file (docusaurus.config.js)
Your Hitsteps site code from Settings > Tracking Code

Install guide

Docusaurus setup

1

Copy your site code

In Hitsteps, open Settings > Tracking Code. Copy the value after code= in the tracking code URL. That value is your site code, and it is the only part you need for this setup.

2

Add the scripts line to docusaurus.config.js

In your Docusaurus project, open docusaurus.config.js and add your site code to the scripts array as shown below. Every page on your site then loads the Hitsteps tracker with route tracking turned on.

3

Deploy and open two documentation pages

Deploy the site, open two documentation pages, then press Back. Each page appears in Hitsteps as its own page, and the page you return to is counted again.

Good to know

  • Route tracking is turned on by the spa=1 parameter at the end of the Hitsteps loader URL, so keep it in place.
  • Keep one copy of the tag. Docusaurus loads the script from your config on every page, so do not paste it into individual docs pages as well.
  • Tested with the live tracker on a Docusaurus-style test site: the first page load, four client-side page changes, and a Back action all recorded as separate pages.

Troubleshooting

  • Replace YOUR_SITE_CODE in the example with your real site code from Settings > Tracking Code. The loader URL must include code= and end with &spa=1.
  • View the page source of a docs page and search for edgecdnplus to confirm the tag is present.
  • If you use a CDN or a build cache, redeploy after the change so the new config is picked up.
  • Check in a private window and confirm your own visit in the Hitsteps dashboard.

What you get

Every docs page, in the order readers open it.

Docusaurus changes pages without a reload, so a load-only snippet sees one page. With route tracking on, you see the whole reading journey.

Each page counted separately

Every documentation page a reader opens shows up in Hitsteps as its own page, in the order they read them.

Back is handled

When a reader presses Back, the earlier page is counted again, so you still see that page revisited.

Where they go next and where they leave

You see which page a reader reads next and where they leave.

After install

Why Docusaurus docs teams add Hitsteps

Watch readers move through your docs live, instead of only seeing the first page load.
Use page activity and Exit Pages to see which page a reader reads next and where they leave.
Keep a single tracker per site and verify your own visit in the live dashboard after setup.