Troubleshooting
If SimpleStats isn't working for your app despite a correct setup, here's how to resolve common issues:
Double-Check the API Token
Verify that the API token in your .env file matches the one from our dashboard. You can review it under Projects > Your projects > Manage API Token. Ensure there are no extra spaces or typos.
Restart Your Config
After updating the API token in your .env file, refresh your configuration by running:php artisan config:cache
Restart PHP-FPM (if using OPCache)
If you're using OPCache, changes to PHP files may require restarting PHP-FPM:sudo service php-fpm reload
Re-trigger a Visit
SimpleStats tracks you as a new Unique Visitor only once per day. How to force a fresh visit depends on your configured tracking_storage (see installation):
session(default): clear your session cookies via Browser Console > Application > Cookies, then revisit your site.cache(headless / SPA setups, see Headless, SPA & Stateless): the visit is identified by a daily hash of IP + User-Agent, so a new tab or incognito window won't trigger a new visit. Either drop the entry for your visitor hash from the cache, runphp artisan cache:clear, or wait for the next day.
Fix Your Queue
Check your QUEUE_CONNECTION setting in the .env file:
- If it's not set to
sync, switch it tosyncand test again. If it works, your queue setup needs attention. - For
databasequeues, ensure the queue is running. Locally, runphp artisan queue:listento test. - For
redisqueues, confirm proper setup: Laravel Queue Docs.
Ensure your production server's queue is also operational!
Add the Trackable Contracts
If new registrations or payments aren't appearing on the dashboard:
- Confirm you've correctly implemented the tracking contracts.
- Verify your user/payment models are listed in the
tracking_typessection of your config file.
Deferred Function Compatibility
If you're on Laravel 11.x and above and your application's skeleton still contains an app/Http/Kernel.php file, you should add the InvokeDeferredCallbacks middleware to the beginning of the kernel's $middleware property:
//app/Http/Kernel.php
// ...
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\InvokeDeferredCallbacks::class,
\App\Http\Middleware\TrustProxies::class,
// ...
];
// ...