I have a file called redir.php that has something like this: <?php switch ($_GET['url']) { case "666": header("Location: http://www.google.com"); break; case "100": header("Location: http://www.yahoo.com"); break; } PHP: How do I implement analytics tracking in it? Ps: I can use any software except Google Analytics to do it.
do a table called redirs with id and location, counter fields or id and case,counter fields then into each case just drop a query with incrementing counter=counter+1
I would create a small script that inserts the ref into a table with that session ID and URL it came form and was redirected to. Then redirect them. Now on other pages have a check_session(); function that will read over the table for a matching session and you can get really crafty with what to display because you know where they came from and where they are. At the end of the destroyed session just archive the data.