Troubleshooting

Common issues and solutions when using PrivateStater.

Common Issues

Script does not load

Symptom: [PrivateStater Getter] Missing prstSite config error in console

Cause: PrivateStaterConfig is not defined before the script

Solution:

<!-- Must be in this order -->
<script>
  window.PrivateStaterConfig = { prstSite: "YOUR_SITE_ID" };
</script>
<script src="https://privatestater.com/privatestater.js"></script>

host_mismatch Error

Symptom: host_mismatch error in console

Cause: Request Origin does not match Host registered in dashboard

Solution:

  1. Check Host value of website in dashboard
  2. Check if it matches the actual access domain
  3. Check for subdomain inclusion (e.g., www.example.com vs example.com)

Not working on localhost

Cause: localhost access is blocked by default

Solution:

  1. Dashboard > Website > [Feature] > Settings
  2. Enable Allow Localhost option

Note: Must be set separately for each feature (Captcha, Feedback).


Blocked by Ad Blocker

Symptom: Script load failure or API request blocked

Cause: Some ad blockers block analytics-related scripts

Solution:


Analytics Issues

Visitor statistics are not showing up

Checklist:

  1. Check Script Installation

    console.log(window.PrivateStater); // Object should be printed
    
  2. Check websiteId

    • Verify it matches the ID created in the dashboard
  3. Check Network Requests

    • Browser Developer Tools > Network tab
    • Check for /api/analytics/collect/visit request
    • Check if response is 204
  4. Wait Time

    • Statistics are reflected within about 1 minute

Duplicate visitors are counted

Not a Cause: This is normal behavior.

Explanation: PrivateStater deduplicates hourly. Visits by the same visitor at different times are counted separately.

Example:


Click tracking not working

Checklist:

  1. Check Function Call

    window.PrivateStater.statsClick("button_id");
    
  2. Check buttonId Format

    • Alphanumeric, hyphens, underscores only
    • No spaces

Captcha Issues

Captcha widget is not showing up

Checklist:

  1. Check Activation

    • Dashboard > Captcha > Settings > Enabled status
  2. Check data-captcha Attribute

    <div data-captcha="prst"></div>
    
  3. Check Console Errors

    • captcha_not_enabled: Captcha not enabled
    • website_not_found: Invalid websiteId

Puzzle verification fails

Cause:

Solution: Fit the puzzle piece to the exact position.


PoW takes too long

Cause: PoW difficulty set too high

Solution:

  1. Dashboard > Captcha > Settings
  2. Change PoW Difficulty to low

Estimated Time by Difficulty:


Token verification fails

Checklist:

  1. Check Token Expiration

    • Token expires after 5 minutes
  2. Check Duplicate Usage

    • Token can only be used once
    • Already verified tokens cannot be reused
  3. Check websiteId Match

    • Use same websiteId on client and server
  4. Check API Request Format

    {
        "websiteId": "my-site",
        "verifyToken": "session-id:signature"
    }
    

honeypot_triggered Error

Cause: Honeypot field filled (Detected as bot)

Checklist:


Feedback Issues

Feedback button is not showing up

Checklist:

  1. Check Activation

    • Dashboard > Feedback > Settings > Enabled status
  2. z-index Conflict

    • Button might be covered by other elements
    • Feedback button z-index: 999998

Screenshot attachment fails

Cause:

Solution:


Feedback is not submitted

Checklist:

  1. Check Required Data

    • At least one of rating, text, or screenshot required
  2. Check Rate Limit

    • Limit 10 per minute
  3. Check Network Requests

    • Check /api/feedback/submit response

Error Code Reference

Error Code Cause Solution
missing_required_fields Missing required fields Check request body
invalid_website_id Invalid websiteId format Check ID format (lowercase, numbers, hyphens)
website_not_found Website does not exist Check website creation in dashboard
host_mismatch Origin and Host mismatch Check domain registration
captcha_not_enabled Captcha disabled Enable in dashboard
feedback_not_enabled Feedback disabled Enable in dashboard
token_invalid_or_expired Token expired/used Start new captcha
token_expired Session expired (5 mins) Start new captcha
puzzle_mismatch Puzzle position error Fit to exact position
pow_invalid PoW hash error Start new captcha
honeypot_triggered Bot detected Disable auto-fill
empty_feedback Empty feedback Enter content
rate_limit_* Request limit exceeded Retry later

Additional Support

If you have issues that are not resolved by the above methods: