Originally posted by nomad9
1. Is this a good way ??? Is there a simplier way to track visitor ??
I also want to know : can we just add a script in the INCLUDE header ???
What the best way to detect unique visitor.
How can i know from where the visitor is coming (ex. google, bookmark ??)
Is there a way to know with Keywords is used in a search engine before the visitor come to my site ???
[/B]
1) Well, it's not a bad way. Of course, this doesn't return just unique visitors, unless you put some extra code in there.
2) Of course. Just make sure not to include it if it shouldn't be included (if it prints out something before headers are sent, it will screw up).
3) Well, IP is sent, and you can store that. This can be spoofed, but most people aren't going to steal an IP just to mess with your script (that they can't even detect, most likely). You'll also have to store the IP in a database so you only get visitors once (Unique). Some people have dynamic IPs, which change every once in a while, or every time they connect. This can throw off your script, but there's no good way around it.
4) Use the referrer: HTTP_REFERER (yes, one "r").
5) Well, assuming they clicked on a link directly from the search engine, you will get a referrer with information containing what they searched for. You can filter this stuff out to find out what they searched for.