Hello everyone, Let's say Site A has a link to Site B and if someone clicks on the link to Site B, Site B analytics will see a visit from Site A as referring site. But at the same time Site A wants to keep track of the clicks from Site A to Site B. If Site A uses a php redirection to keep track of the clicks, then Site B will not know the visitor is from Site A. How can I keep track of clicks for Site A and shows up on Site B as a referring site at the same time? Thank you very much.
for A, you may have to encapsulate all links to a redirector script and B, you may want to use prepend file for tracking the referer or include in every page
I would recommend you insert a php file in your index.php like: include_one(php/referer.php) Code (markup): And the referer.php would contain a $_SERVER['HTTP_REFERER'] <- this contain where the user comes from. $_SERVER['REQUEST_URI'] <- this contains the currently visiting site. And you only have to save these values into a DB... $from = $_SERVER['HTTP_REFERER']; $where = $_SERVER['REQUEST_URI']; mysql_query("INSERT INTO visitor SET from = '$from', where = '$where'"); Code (markup): Don't forget to create the tables in your DB... Cheers,
Thats possible You can use an intermediate gateway script for that when sending to another url and the receiver side can able to use the HTTP Refferer function to count that
i would pass all the links pointing out from site A to some sort of gateway script which tracks their target URL. use SERVER variables to check where visitors are coming from and save interesting results to a database (i.e. save visits coming from site B)