Link to home
Start Free TrialLog in
Avatar of ddantes
ddantesFlag for United States of America

asked on

Tracking website visitor behavior

I have a menu on my website at www.mauitradewinds.com   Most of the links are directed to internal pages, so I can track how often visitors browse those pages.  But one of the links ("TripAdvisor") targets an external website.  Is there a way I can determine whether visitors use that link?  The link opens a new browser window, but not within my domain.
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddantes

ASKER

Thank you for your suggestion.  Regarding the page which performs the redirection, is the code which you specified all that is needed?  Due to inexperience, I need to know specifically what to put on the php page.
<?php
//you can capture the ip or make use of count and than store it in db to know howmuch time visitor has visted this page

// redirect the page to desired url
header('location:http://xyz.com');
exit;
?>
>> is the code which you specified all that is needed?
Yes! Just make sure you provide the right domain for the external site, but other than that, both the PHP OR the ASP given earlier is all you would need.  Then in your server logs, you would see hits for YOUR own page (TripAdvisor.php or TripAdvisor.asp - depending on which page you decide to implement).
Avatar of ddantes

ASKER

That did it!