You could try client-side redirection.
For example, something like this should provide you an opportunity to thank visitors, present a disclaimer, and provide users who disable JavaScript a means to access the external site, and hopefully thwart the evil consequences of Google Analytics...
<html>
<head>
<meta http-equiv="refresh" content="3;url=<%= request("u") %>" />
<title>Redirecting...</title>
<script type="text/javascript">
var tmr = null;
function doRedirect() {
window.location.href = '<%= request("u") %>';
}
window.onload = function() {
tmr = window.setTimeout(doRedirect, 3000);
}
window.onunload = function() {
window.clearTimeout(tmr);
tmr = null;
}
</script>
</head>
<body>
<p>Thank you for visiting our site. You will be redirected to <%= request("u") %> in 3 seconds</p>
<p>We take no responsiblity for the content displayed on external sites.</p>
<noscript>
<p>If you are not redirected, please <a href="<%= request("u") %>">click here</a> to navigate to the site.</p>
</script>
</body>
</html>
Please note: The above code should not be used in a production environment, since request("u")
is not validated nor sanitized before use. Please take additional precautions about confirming all input parameters before relying on them.
Hope this helps.