Solved

Tracking website visitor behavior

Posted on 2011-09-07
5
310 Views
Last Modified: 2012-08-13
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.
0
Comment
Question by:ddantes
  • 2
  • 2
5 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 125 total points
ID: 36500634
Instead of linking directly to the external page, why don't you set up a page on your server - ex:
TripAdvisor.php

and then in THAT page you redirect the to the external page:

<?php
header('Location: http://www.tripadvisor.com');
exit;
?>

(In ASP):
<%
'TripAdvisor.asp
Response.Redirect("http://www.tripadvisor.com")
Response.End()
%>

Thus, if you can track your other pages, then tracking tripAdvisor.php (or tripAdvisor.asp - depending on what you are using), would not be any different since the page would be on your server as well.

Open in new window

0
 

Author Comment

by:ddantes
ID: 36500681
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.
0
 
LVL 15

Expert Comment

by:Insoftservice
ID: 36500696
<?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;
?>
0
 
LVL 82

Expert Comment

by:hielo
ID: 36502462
>> 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).
0
 

Author Comment

by:ddantes
ID: 36503873
That did it!  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now