antonioribeiro / antonioribeiro/tracker
Don't consider specific user-agents and robots to be online users [feature request]
- Dominant language
- PHP
- Stars
- 2.9k
- Forks
- 594
- PR merge metrics
- No merged PRs in 30d
Description
By default, Tracker writes a session to tracker_sessions.
I've created a simple route as follows:
```php
Route::get('/test/', function () {
return Tracker::onlineUsers()->count();
});
```
```bash
$ curl http://localhost:8000/test/
1
$ curl http://localhost:8000/test/
2
$ curl http://localhost:8000/test/
3
$ curl http://localhost:8000/test/
4
```
This is rather undesired behavior because we create sessions for all kinds of robots which should not to be considered online users.
I think a better solution is to not create sessions for robots. What do you think?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the session-writing path used by Tracker::onlineUsers and the tracker_sessions table, then determine how the request user-agent can be identified there. The work is done when the specified robots and user-agents no longer create sessions or count as online users, while ordinary requests retain the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- analytics, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100