antonioribeiro / antonioribeiro/tracker
After User Login, a new uuid record for same user will be inserted to table `tracker_sessions`
- Dominant language
- PHP
- Stars
- 2.9k
- Forks
- 594
- PR merge metrics
- No merged PRs in 30d
Description
I set the tracker to track only for the product detail page.
In my TrackingController.php, I create a method called `track()`. Within the method, I manually call `app('tracker')->boot()` to initialise the Tracker. Then I called the `Tracker::currentSession()` to get information of my visitor.

However, along with my var_dump($visitor), I can see the the `uuid` of the same logged-in user keep changing.

Then i went deeper to the package and try to print out variables. I can see that when calling currentSession(), there are two calls to the package function, one with `user_id` being `null`, another with the correct `user_id` on the variable `$this->sessionInfo`.
Any idea to solve this? I have been trying to solve this issue for two days and have no ideas. Any help would be appreciated.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in TrackingController.php at the track() method and reproduce the calls to app('tracker')->boot() and Tracker::currentSession(). Trace why currentSession() is called once with a null user_id and once with the logged-in user, then inspect the resulting tracker_sessions records. Done means repeated tracking for the same logged-in user no longer creates changing UUID records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- authentication, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100