CMS

Install Hitsteps on Craft CMS

Add the Hitsteps tracking code to the base layout template of your Craft site and watch live visitors, page activity, and heatmaps on your public pages.

Before you start

Control-panel access to your Craft site, or file access to its templates folder
Your full Hitsteps tracking code
Permission to clear the Craft cache

Install guide

Craft CMS setup

1

Copy the full tracking code

Open your Hitsteps site settings and copy the full tracking code from the Tracking Code section. Use the code from your account, which already carries your real site key; the block below is only an example of where your code goes inside your base layout template.

2

Open the base layout template

In Craft CMS every public page is rendered from templates in the templates/ folder, and most sites reuse one base layout that prints the outer <body> markup for every page. Open the template that renders your closing </body> tag. Common names are _layouts/base.twig, _layouts/main.twig, or _layout.twig, but your theme may use its own name; search for </body> in templates/ if you are not sure.

3

Paste the code before the closing body tag

Paste the block just before the closing </body> tag in that base layout template, so it loads on every public page that extends the layout. Replace only your account tracking code, and keep the surrounding template lines exactly as they are.

4

Clear the Craft cache

Craft recompiles templates from the templates/ folder on every change, but cached page output can still hold the old markup. In the Craft control panel open Utilities and choose Clear all caches, or run php craft clear-caches/all from the project folder. If your site sits behind a CDN or an extra page-cache layer, clear that as well.

5

Check your own visit

Open a public page in a private window and move around the site. Then open the Hitsteps live dashboard; your visit should appear shortly.

Good to know

  • Consent managers: if your site runs a consent tool, keep the Hitsteps script in its own category there, and your existing consent rules decide when it loads.
  • Keep one copy of the code. If Hitsteps is already installed through another plugin or header script, remove the old copy so visits are not counted twice.
  • The tracking code in your Hitsteps account already contains your site key.

Troubleshooting

  • Make sure you pasted the full tracking code, not only your API key.
  • View the page source of a public page and search for edgecdnplus to confirm the code is present.
  • If your site uses a CDN, a {% cache %} tag, or another caching layer, clear that cache as well after adding the code.
  • Check in a private window and confirm your own visit in the Hitsteps dashboard.

Follow-up guides

Running WordPress or Drupal alongside?

Use the installer for the CMS that powers each site, and keep a single tracker per site.

After install

Why Craft CMS site owners add Hitsteps

Watch visitors arrive on your public pages live, instead of waiting for delayed reports.
Use page activity and heatmaps to see which pages and sections actually engage visitors.
Combine visitor source, current page, returning history, and behavior context for support and conversion review.