← All guides
W3 min

Install on WordPress

Add the tracking script to a WordPress site through a header/footer plugin, without editing your theme files directly.

  1. Find your site ID

    From the dashboard, go to Settings and copy the site ID (SITE_ID) you created for this WordPress site.

  2. Install a header/footer plugin

    Recommended: from wp-admin → Plugins → Add New, search for “WPCode” (formerly Insert Headers and Footers) and install it. It's the safest way to add code to <head> without editing your theme files — the code survives updates and theme changes.

  3. Add a Custom HTML Snippet

    From the WPCode → Header & Footer menu (or Code Snippets → Add Snippet → Custom HTML), paste the snippet below into the Header field, then save and activate the snippet.

    Header
    <script defer data-site="SITE_ID" src="https://visitrack.app/tracker.js"></script>
  4. Alternative: edit header.php directly

    If you'd rather not install a plugin, you can paste the snippet directly before </head> in your theme's header.php — but only in a child theme, otherwise the change disappears on the next theme update. Appearance → Theme File Editor → header.php.

  5. Check it live

    Open your site, browse a few pages, then check the Live tab in the dashboard — you should show up as an active visitor within a few seconds.

Don't have a site ID yet? You'll get one right after you create an account and add your site from Settings.

Other platforms