Solved

Tracking website visitor behavior

Posted on 2011-09-07
5
314 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

759 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