One of our project requirement is to be able to track individual users, including guests. Tracking guest/anonymous users can be quite challenging considering the different possible scenarios.
The easiest scenario is when the browser supports cookies, in such case, just assign a unique ID as a cookie and retrieve the cookie everytime access is made. The basic concept is to create an ID that will not likely be duplicated in any user. So, in our case, we used IP Address + User Agent + Forwarded For + Time + Random number. That should create unique ID for anybody accessing the site anywhere and anytime in the world.
The second scenario is when the browser doesn’t support cookies. This is more involved because we need to assign an ID unique and consistent for a specific user. In this case, we used IP Address + User Agent + Forwarded For. There are some pitfalls with this approach, such as when user changes internet connection on a DHCP network… but I guess that’s a bit of a technical limitation at the moment.