Portal Home > Knowledgebase > Articles Database > Header redirect without original source uncovered?


Header redirect without original source uncovered?




Posted by lexington, 12-08-2009, 08:10 AM
Hello, I thought if I used a redirect like so: It would display SITE B as the referrer instead of SITE A. Basically I didn't want to uncover the origin of the link in Google Analytics, I thought it would show up the redirection site (SITE B) as the origin but it shows SITE A as the origin. Is there a way to make it redirect so that the referrer is my redirection site instead of the original? I hope this makes sense, and thanks If there is no way, worst case scenerio I will just have it redirect to a webpage where the user will have to manually click on the link to proceed and hopefully that will show as the origin.

Posted by enkapsulate, 12-08-2009, 01:01 PM
What's the need to show the origin? Can't you just configure your Google Analytics correctly?

Posted by 01globalnet, 12-08-2009, 06:54 PM
I do not understand why you want this, but here is the code. notice: referers are sent by the browser Last edited by 01globalnet; 12-08-2009 at 07:01 PM.

Posted by lexington, 12-09-2009, 09:33 AM
Hi, sorry I didn't see the reply until now. OK the reason why I want this is because someone asked me about advertising, and I know of a site that will bring them traffic, but I do not want to uncover my secret So I would like for that site to send them traffic without them seeing on their Google Anallytics account that the traffic is coming from that site, but from my site instead. So the header referrer code you pasted will work? EDIT Since you got me going in the right direction, I Googled the code you pasted and some say it cannot be done, others say it may work with javascript?

Posted by 01globalnet, 12-09-2009, 04:47 PM
Ok then this is simple - you cannot control the headers of a site that does not belong to you, so you will handle this at your side. At the advertising secret site, put a page in your site like http://www.mysite.com/ads.php?target=targetsite Then in ads.php you may do the redirection with php code or javascript. The referer then will be your site. Notice the parameter "target", so that if you have more than one "client", you can have different targets urls.

Posted by lexington, 12-09-2009, 05:09 PM
We must think alike since that is extremely similar to the code I have done, switch and everything lol. To my surprise, written like that Google Analytics still shows the original site, as if it totally ignored my header redirect. That is why I asked to see if there is another way.

Posted by enkapsulate, 12-09-2009, 05:58 PM
Google uses javascript to read it from the browers cache I think, its not based on the URLS. I thinks :/

Posted by xphoid, 12-12-2009, 09:51 AM
Use a meta refresh as that will redirect client side and the browser will put your site as the referrer.

Posted by lexington, 01-03-2010, 01:08 PM
Thanks xphoid, I am surprised I didn't think of that since I am always using a meta redirect to not reveal files in particular directories of my sites. So add: in the header and it wil show my site as the referrer instead of the real original referral correct? Thanks



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Linux kernel 3.x (Views: 833)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.