Jump to content
xisto Community
Sign in to follow this  
CaptainRon

How To Trap The URL To Which A User Is Navigating To?

Recommended Posts

I want that whenever a user tries to navigate away from my page (assume by directly typing the URL), I be able to trap the destination URL. Whenever someone would want to navigate away, the window.onunload will fire up. But how to trap the target URL? Any suggestions?

Share this post


Link to post
Share on other sites

There is no way to find out what your user types into the navigational toolbar. That would be an invasion of privacy. The only way you can find a user's target URL is when they click on a link on your site. You just need to add something to log the clicks in your link. You can also log where users come from with a referrer ip catcher script.

Share this post


Link to post
Share on other sites

You're one of those annoying web page developers, the ones that make their sites throw thousands of ads at you when you want to leave.Shame on you CaptainRon, shame :PWhy would you want to know where they are going anyway? You should be wanting to know how to keep them.

Share this post


Link to post
Share on other sites

Actually there's a way of detecting the outbound URL whenever you navigate away from the current domain.

 

I'm not sure of the functions involved but it's primarily based on JavaScript and used by many of the scripts that track which AdSense Ad you clicked on and subsequently which URL you landed up on.

 

Studying the innards such scripts might help you... here's one I'm using as of now: Contextual Tracker.

 

However, AFAIK such scripts have their limitations. If we take Contextual Tracker for example, it's unable to track outbound URLs from Firefox, as it happens to be one of the more secure browsers. In contrast, Internet Explorer reveals the outbound URLs just fine ;)

Share this post


Link to post
Share on other sites

... And since Internet Explorer is used by over 50 per cent of the Internet "population", this could prove to be quite useful ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.