Back to Dashboard

Troubleshooting Guide

Common issues and how to fix them

Quick Checks

  • Script is installed: Check your HTML source code and verify the VisitorPurse script is present in the <head>
  • API key is correct: The data-key attribute must match your site's API key
  • No JavaScript errors: Open browser DevTools (F12) and check the Console for errors
  • Cache cleared: Try hard refresh (Ctrl+Shift+R / Cmd+Shift+R) or clear your browser cache

🔴Script not loading

Symptoms: No events showing in dashboard, browser console shows 404 error for sp.js

Solution:

  1. Verify the script URL is exactly: https://visitorpurse.com/sp.js
  2. Check your domain's Content Security Policy (CSP) allows external scripts
  3. If using a CDN or build system, ensure the script isn't being stripped out during build

🟡Events not appearing

Symptoms: Script loads successfully but no events in dashboard

Solution:

  1. Verify your API key is correct by checking Settings
  2. Wait 10-30 seconds after visiting your site - events can take a moment
  3. Try sending a test event from your dashboard to verify the connection
  4. Check if you're blocking yourself with an ad blocker (disable for your own domain)

🟠Next.js / React specific issues

Symptoms: Works in development but not in production, or events duplicated on every page change

Solution for Next.js App Router:

  1. Add script to app/layout.tsx inside the <head> using Next.js Script component with strategy="afterInteractive"
  2. Make sure it's in the root layout, not individual page components
  3. Clear .next build cache and rebuild: rm -rf .next && npm run build

Solution for Next.js Pages Router:

  1. Add script to pages/_document.tsx in the <Head> component
  2. Use regular script tag, not Next.js Script component in _document

🟣WordPress issues

Symptoms: Can't find where to add the script, or script gets removed after updates

Solution:

  1. Install the "Insert Headers and Footers" plugin or similar code injection plugin
  2. Paste the VisitorPurse script in the header section
  3. Alternatively, edit your theme's header.php and add the script before </head>
  4. For child themes: make sure you're editing the child theme, not parent
  5. Clear WordPress cache (if using a caching plugin like WP Super Cache)

🔵Ad blockers & privacy extensions

Symptoms: Events tracked inconsistently or not at all

Solution:

  1. VisitorPurse is privacy-first and doesn't use cookies, so most ad blockers allow it
  2. If your ad blocker is aggressive, whitelist visitorpurse.com
  3. Test in an incognito window without extensions to verify script works

Still having issues?

We're here to help. Send us your site URL and we'll diagnose the problem.

Email Support