Exit page. Where do my users go?

V

vijay

Is there a way using javascript (or anything else) to know where the
users go after they leave my page? Like "Do you want to navigate
away ..." does a good job of alerting people no matter how they want
to navigate away, clicking on links, clicking on bookmarks, typing new
URLs etc, can I know where they go when they exit my page?
 
V

VK

Is there a way using javascript (or anything else) to know where the
users go after they leave my page? Like "Do you want to navigate
away ..." does a good job of alerting people no matter how they want
to navigate away, clicking on links, clicking on bookmarks, typing new
URLs etc, can I know where they go when they exit my page?

No, because that would be a rude violation of users surfing privacy,
so such mechanics is blocked. Withing your own side you could use page-
specific cookies so the next page could check such cookie to see what
page user came from.
 
T

Thomas 'PointedEars' Lahn

Is there a way using javascript (or anything else) to know where the
users go after they leave my page? Like "Do you want to navigate
away ..." does a good job of alerting people no matter how they want
to navigate away, clicking on links, clicking on bookmarks, typing new
URLs etc,

Don't do that, then.
can I know where they go when they exit my page?

No, because client-side scripting was not invented for the purpose of spying
on people or for annoying them in other ways.


PointedEars
 
L

Lasse Reichstein Nielsen

Is there a way using javascript (or anything else) to know where the
users go after they leave my page?

Generally not.
Why would you need that?
Like "Do you want to navigate away ..." does a good job of alerting
people no matter how they want to navigate away, clicking on links,
clicking on bookmarks, typing new URLs etc,

That would be the "onunload" event? It's nonstandard, but I guess it works.
can I know where they go when they exit my page?

Only if they follow a link on your page.

The easiest way to achieve it would be changing each link to a redirecting
page. I.e., instead of "http://www.example.com/", the link is
"http://www.mydomain.com/redirect?to=http://www.example.com/" and that
page records the passing user and returns a redirect status (301).

It does slow the browsing down slightly, and people can become very
annoyed at crap like that.

Another, worse, approach is to have each link trigger some javascript
that sends a XMLHttpQuery request and delays the user for long enough
to get it off, e.g., using an onunload annoyance (you don't need the
response anyway).



All in all, stop spying on your users. We don't like it.

/L
 
T

Thomas 'PointedEars' Lahn

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top