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 Existing Projects > Your Existing Instances. 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
Delete Your Session
SimpleStats tracks you as a new Unique Visitor only if you don’t have an existing session. To test this, clear your session cookies:
- Open Browser Console > Application > Cookies.
- Remove the session cookies, then revisit your site to trigger a new visit.
Fix Your Queue
Check your QUEUE_CONNECTION
setting in the .env
file:
- If it’s not set to
sync
, switch it tosync
and test again. If it works, your queue setup needs attention. - For
database
queues, ensure the queue is running. Locally, runphp artisan queue:listen
to test. - For
redis
queues, 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_types
section of your config file.