Skip to content
visitortrack.ingBETA
Getting started

How do I add cookieless analytics to WordPress?

The quick answerCreate a website in Visitor Tracking and add its generated script to WordPress’s site-wide header using an appropriate code-insertion setting or plugin. Publish the change and verify a visit on the live website.

Get the tag for the right website

In Visitor Tracking, create your free account and choose Add website. Enter your site name and domain; pasting the full HTTPS address is fine. Copy the generated tag from the installation panel. Each website has its own ID, so do not reuse a tag intended for another site.

The standard tag records pageviews without setting tracking cookies or a persistent browser-stored visitor ID. It does not need a dedicated Visitor Tracking WordPress plugin. What you need is a reliable way to insert that one script across your public pages.

Add it to the shared header

For a self-hosted WordPress site, use a header-code plugin or a maintained theme or hosting feature that supports site-wide scripts. Paste the full tag, save, and make sure it appears on the published site. Avoid placing it in an individual post’s content if you want coverage across the website.

WordPress.com’s current header-code instructions describe using WPCode’s Header & Footer screen on eligible paid plans. Its free plan does not support that method. Check your current plan and platform documentation before choosing an installation path.

  1. Find your site-wide header or custom-code setting.
  2. Paste exactly one copy of the generated tracking tag.
  3. Save and publish the change.
  4. Clear any relevant page cache so visitors receive the updated HTML.

Read WordPress.com’s header-code instructions

Test a post as well as the home page

Open your published home page, then a blog post and an archive page. Different templates can load different headers. Return to Visitor Tracking, use Check installation, and look for the new activity in Realtime.

If your code-insertion tool excludes administrators, your own logged-in visit might not be tracked. Test in a separate browser context with the consent choices appropriate to your setup. If you use optimisation tools that delay JavaScript, check that the collector request eventually happens as well as the script download.

Prevent duplicate or misleading pageviews

Do not install the same tag through a header plugin, a theme setting and a tag manager simultaneously. One page load should normally create one automatic pageview in the standard setup. If a refresh appears twice, inspect the page source and the browser’s Network panel for repeated installations.

After a theme change or a migration, repeat the first-page and second-page checks. Your historical data stays in the analytics service, but new activity depends on the tag remaining present. For a WordPress site that uses client-side navigation, also test Back and Forward behaviour.

Fix an installation that is not recording visits

See what is included in the free beta

KEEP EXPLORING

The next useful question.

A CLEARER PICTURE STARTS HERE

Your next insight starts with one small tag.

Create your account, add your website, and see what brings people to you.

Create your free account Unlimited websites in beta · No credit card