Solved

Tracking website visitor behavior

Posted on 2011-09-07
5
309 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
Comment Utility
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
Comment Utility
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
Comment Utility
<?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
Comment Utility
>> 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
Comment Utility
That did it!  
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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

5 Experts available now in Live!

Get 1:1 Help Now