Solved

Tracking website visitor behavior

Posted on 2011-09-07
5
311 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

813 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

10 Experts available now in Live!

Get 1:1 Help Now