Alright so I am making a tracking system where I would write down every user that came from a different domain (let's say that my domain is https://aaa.com) so any user that comes from any other website would first have to go "/tracking.php" and then I would do the rest via code.
Basically if HTTP_REFERER is not https://aaa.com then redirect the user to tracking.php page