Skip to content

Install Crustat on WordPress

Install the Crustat plugin, paste your site ID under Settings → Crustat, and every page of your WordPress site is tracked.

Before you start

You need:

  • A WordPress site running WordPress 5.8 or newer, with PHP 7.4 or newer.
  • An administrator account on that site (the plugin’s settings page is for admins only).
  • Your Crustat site ID. In Crustat, open your site, go to Site settings → Install and click Copy ID next to Site ID. It’s 16 characters long.

Install the plugin

  1. In your WordPress admin, go to Plugins → Add New.
  2. Search for Crustat.
  3. Click Install Now, then Activate.

Until you save a site ID, WordPress shows a short note on the Plugins and Dashboard screens with a link to the settings.

Paste your site ID

  1. Go to Settings → Crustat. There’s also a Settings link under the plugin’s name on the Plugins screen.
  2. Paste your ID into Site ID.
  3. Click Save Changes.

If the ID isn’t 16 letters, digits, - or _, the plugin shows an error and keeps the ID you had before. The most common cause is copying the whole tracking line instead of just the ID.

Once it’s saved, the plugin adds Crustat’s line to the <head> of every page on your site. Your first visit shows up in your dashboard about a minute after it happens.

Your own visits

Under Your own visits there’s a checkbox that leaves out people who can edit the site while they’re signed in. It’s on by default, so you, your editors and your authors don’t show up in your own stats while logged in to WordPress.

This means a quick test while you’re signed in won’t appear. To check that it works, open your site in a private window, or in a browser where you’re not logged in to WordPress.

The plugin also leaves the line out of the WordPress admin, post previews, the theme customizer preview and your RSS feeds.

Caching and optimization plugins

If your pages come from a cache, clear it after saving your ID so the cached pages pick up the new line.

Some optimization tools combine, delay or defer scripts, and that can stop Crustat from finding its own settings. If you use a plugin with an option to combine or delay JavaScript, exclude stats.crustat.com/script.js from it. Cloudflare Rocket Loader needs nothing from you: the line the plugin adds already carries data-cfasync="false", which tells Rocket Loader to leave it alone. See Rocket Loader and script combiners for the details.

What the plugin does and doesn’t do

  • It adds one line to your pages. Nothing else: no cookies, no database tables, and no calls from your server to Crustat.
  • Your stats live in your Crustat dashboard, not inside WordPress.
  • Deleting the plugin removes its one setting. Your stats stay in Crustat.

Not seeing your visit?

First, make sure you tested signed out of WordPress. Then check that the line is on your pages: open your site, view the page source, and search for crustat. If it’s missing, check the ID is saved and clear your cache. For anything else, see visits aren’t showing up.

Still stuck? Write to hello@crustat.com.

All articles
The mascot waiting

Almost ready

We're opening to everyone soon.

Crustat is in its final checks before we open sign-ups. Leave your email and we'll write once, the day it opens, with your 14 days free waiting.

One email when we open. No newsletter. See our privacy page.