Can I use IPs to log guests viewing my posts?

I want to log (and display) a list of guests/non-logged-in users that view my posts. I want the displayed list under actual post content.

Are IPs the best way to do this?
Are Cookies the best way?
Is a combination the best way?

How would I get started?