we can use Request.UserHostAddress
to catch referrer IP address(for example who clicked a link) but you know by this way we can't ensure about uniqueness of user! this ip don't work correctly in NAT environment because it might be refer to hundreds of machines.
i'm looking for a posible way to detect really how many peoples clicked a specify link.
i think UserHostAddress
can't help me.
so, is there any way to fetch some data from user's OS or browser which is unique?
(consider that that link is not in my own application. it is in a remote page)
views:
55answers:
3If this link is from the web page you own, you can set a unique cookie on the parent page.
The answer from Grzenio is correct; I'll just elaborate a bit. The only way to make sure that the client sends you something unique is for you to have sent it to the client first, and for you to have made sure it is unique. Creating a GUID and setting it in a cookie is one way to do it. If you care about spoofing, then encrypt the GUID first.
Clients aren't obligated to have something unique about them, and IP addresses were explicitly designed to not identify a client computer.
Without being able to set cookies, there is no guarantee that you'll be able to tell users apart. Google Analytics and all of the other web analytic programs use either IP, cookies, or UserID to differentiate the users.