I am trying to trigger a customer satisfaction survey when users leave our site. how do I access the URL that the user is trying to go to during the onUnload event?
I should have been more explicit - I'm trying to detect when a user leaves my site so they can randomly be asked if they would like to take a customer satisfaction survey.
the answers I have found so far all involve setting a flag to prevent an onUnload function from running when you follow internal links on the site. the easiest way I found was to do this:
so that the survey is only run when a user leaves the URL. the only down side is this only seems to work in v6 browsers, but I dont want to add the js to every single link so I don't have much choice
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.