Search code examples
javajavascriptippersonalizationclientip

Client recognition by ip


I want to track the clients that visits my site, and save them by IP. That way, next time he will visit my site I could customize my site to match is needs and make it more personal.

One of my problems is that the clients IP is constantly changing.... Is there a way to combine all the client IPs together? Is there a better way to recognize a client?

Thanks


Solution

  • This is a problem that doesn't have a 100% solution unless you have them work with you by providing a login. Then you can customize by user.

    If that option is off the table then there are other ways you can track people.

    • You can use your own cookies. But they can clear their cache.
    • You can use advertisers cookies. But that likely won't be enough info
    • You can use ips. but their IP will likely change.
    • You can use user agent string. but that will also likely change over time

    You use combinations of these to try to provide a match to your user, but I doubt any of these will be 100% effective. Especially as your website grows, then you'll get false matches by the http://en.wikipedia.org/wiki/Pigeonhole_principle

    Best solution is to work with them by having a username/password so that they can login and get access to their profile.