Mobile app version of vmapp.org
Login or Join
Cooney921

: How to redirect keeping the referral without server-side redirects? I have an HTML page hosted in Dropbox that some external websites link to. I want to redirect to a different page using only

@Cooney921

Posted in: #Analytics #Html #Javascript #Referrer

I have an HTML page hosted in Dropbox that some external websites link to. I want to redirect to a different page using only HTML or Javascript, since I can't use any server-side redirects.

My goal is to be able to keep the original referral information for analytics. I've tried different ways but they all end up showing up with no referral.

So if a blog that I have no control over (B) links to my public static page on Dropbox (D), and I want a redirect to the new page hosted elsewhere (N), I would like for the analytics for N to be shown as B, not D.

Is that even possible?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

3 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

<script language="javascript" type="text/javascript">
// <![CDATA[
function Partners_onclick() {
window.navigate("page2.html");
}

// ]]>
</script

10% popularity Vote Up Vote Down


 

@Sarah324

I'm not so sure if that could work, but you could try to manually (e.g. with JavaScript) submit the pageview to the N analytics account from the Dropbox Page, then you can do your redirect. Which probably means that you will have two pageviews for the same source but at least you will know the ones that came from the blog.

10% popularity Vote Up Vote Down


 

@Ann8826881

A JavaScript redirect would ordinarily pass the HTTP Referer, providing the client is set to do so - but this will contain the URL of your JavaScript/Dropbox page, not the original referer.

BUT... Dropbox is probably using HTTPS. If you are redirecting to vanilla HTTP (non-HTTPS) then the browser will not set the HTTP referer header in these circumstances. See: RFC 2616 - Section 15.1.3

In order to at least pass the information contained in the original HTTP referer, you could perhaps pass this as part of the query string? If you are able to extract this in your analytics?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme