Skip to Content
InstallationVerify Installation

Verify Installation

Confirm that Ghost Metrics is correctly tracking your website.

The quickest way to verify your installation:

  1. Open your Ghost Metrics dashboard
  2. Navigate to Visitors → Real-time (or Visitors → Visits Log — and set the calendar to today, since reports default to yesterday)
  3. Open your website in a new browser tab (use incognito/private mode for best results)
  4. Browse a few pages on your site
  5. Check the report — you should see your visit appear within seconds

If you see your visit, your installation is working correctly.

Method 2: Browser Developer Tools

Check that both the tracking script loads and tracking requests are actually sent:

  1. Open your website in your browser
  2. Open Developer Tools:
    • Chrome/Edge: Press F12 or right-click → Inspect
    • Firefox: Press F12 or right-click → Inspect
    • Safari: Enable developer tools in preferences, then press Cmd+Option+I
  3. Go to the Network tab
  4. Refresh the page
  5. Filter by your Ghost Metrics domain

What to look for:

  • The container file (container_…js) loading with status 200 — proves the snippet is installed
  • A request to tracker.php with status 200 or 204 — this is the actual tracking request, and it’s the real proof that data is being sent

The container loading without a tracker.php request means the snippet is present but no tracking fired — usually a container configuration or consent issue.

Method 3: Check Page Source

Verify the tracking code is present in your HTML:

  1. Open your website
  2. Right-click anywhere on the page
  3. Select View Page Source (or press Ctrl+U / Cmd+U)
  4. Press Ctrl+F / Cmd+F to search
  5. Search for ghostmetrics or _mtm
  6. Confirm your tracking code appears in the source

Note: seeing the snippet in the source (or an _mtm array in the console) only proves the snippet is installed — use Methods 1 or 2 to confirm tracking actually fires.

Method 4: Tag Manager Preview Mode

The container has a built-in debugger that shows exactly which triggers and tags fire:

  1. In Ghost Metrics, open Tag Manager and select your container
  2. Click Preview / Debug
  3. Your website opens with a debug console overlaid: triggers that fired are listed on the left, and the tags they fired on the right
  4. Browse your site and confirm the pageview tag fires on each page

To open preview mode directly on another browser or device, append ?mtmPreviewMode=YourContainerID&mtmSetDebugFlag=1 to your site’s URL; append ?mtmPreviewMode=0 to turn it off.

Common Issues and Solutions

No Data in Real-Time Report

Possible causes:

  • Tracking code not installed: Check page source to confirm the code is present
  • Container version not published: A container only serves its published version — if tags were changed but never published, nothing fires
  • Wrong container ID: Verify you’re using the correct snippet from the Install Code page
  • Consent manager blocking: If your consent banner gates analytics, tracking won’t fire until consent is given — test after accepting
  • Caching: Clear your site’s cache and try in an incognito window
  • Ad blocker: Disable any ad blockers temporarily and test again
  • JavaScript error: Check the browser console for errors

Tracking Code Not in Page Source

Possible causes:

  • Code not saved: Re-save your tracking code in your CMS or plugin
  • Caching: Clear all caches (plugin cache, CDN, browser)
  • Wrong location: Make sure the code is as high as possible in the <head>
  • Theme issue: If using functions.php, verify the child theme is active

Network Request Failing

Possible causes:

  • Domain typo: Double-check the Ghost Metrics domain in your tracking code
  • CSP blocking: Your Content Security Policy may be blocking the script or the tracking request — see CSP configuration
  • Firewall/proxy: Corporate firewalls may block analytics domains

Tracking Requests Fire but No Data Appears

If tracker.php requests return 200/204 but nothing shows in reports, the request may be rejected during processing (for example, your own IP is excluded in the site settings). Contact support — we can check the tracker logs and tell you exactly why a request was discarded.

Partial Tracking (Some Pages Missing)

Possible causes:

  • Tracking code not on all pages: Verify the code is in a shared header template
  • Single Page Application: SPAs need route-change tracking — see SPA tracking
  • Conditional loading: Check if any code is preventing the script from loading on certain pages

Testing Tips

Use Incognito/Private Mode

Browser extensions and cached data can interfere with testing. Always verify in a fresh incognito window.

Set the Date to Today

The Visits Log and most reports default to yesterday. Your test visit is today — adjust the calendar before concluding tracking is broken.

Check Multiple Pages

Don’t just test the homepage. Navigate through several pages to ensure tracking works site-wide.

Wait a Few Minutes

While real-time data usually appears within seconds, give it 2–3 minutes before troubleshooting.

Still Having Issues?

If you’ve tried everything above and tracking still isn’t working:

  1. Take a screenshot of your browser’s Network tab showing the tracking request
  2. Note any errors in the Console tab
  3. Contact Support with these details

We’re happy to help you get tracking working properly.

Last updated on