Installing the tracking code

Last updated 2026-04-28

The tracking code is a single <script> tag. Paste it into your site's HTML, just before the closing </head> tag, on every page you want to track.

The snippet

<!-- HitCounters.com -->
<script async src="https://hitcounters.com/api/tracker.js?code=YOUR16CHARCODE"></script>
<noscript><img src="https://hitcounters.com/api/track.php?code=YOUR16CHARCODE&noscript=1" alt="" style="display:none;"/></noscript>

Replace YOUR16CHARCODE with your actual tracking code from the Sites page.

Platform-specific guides

Detailed step-by-step for the major platforms:

All platforms →

Generic instructions (any platform)

  1. Find the file or settings area where you can edit your site's HTML <head> — usually the theme's header.php, layout.html, or a "head injection" plugin.
  2. Paste the snippet anywhere between <head> and </head>. Closer to the bottom is fine.
  3. Save the file or settings.
  4. Reload your site in a private/incognito browser window. The snippet should now load on every page.

Will this slow down my site?

No. The script tag uses async, which means the browser fetches it in the background without blocking the page render. The full script is under 25 KB.

Do I need to add it to every page individually?

No. Modern themes use a single layout/header file that wraps every page — add the snippet there once, and it loads on the whole site automatically.

What if I have multiple sites?

Each site has its own tracking code. Don't reuse one code across two domains — visits get attributed to whichever site that code belongs to. Add each site separately on the Sites page.

Related articles

Still need help? Send us a message — we reply within 24 hours.