Go Back   TechArena Community > Technology > Technology & Internet
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 20-01-2011
Member
 
Join Date: Oct 2010
Posts: 42
Is there any way to Track 301 Redirected Sub-Example

I have a sub example which is redirected (301) to abc.com. I have to track the sub example. I did the entire essential step to track the sub example but because of, 301 redirection I am unable to track the record. Compassionately let me know the steps to track 301 redirected sub examples. Or if anyone has any other idea or any other information regarding this type of problem then please join me, or if have any solution for this then please provide.
Reply With Quote
  #2  
Old 20-01-2011
Member
 
Join Date: May 2008
Posts: 685
Re: Is there any way to Track 301 Redirected Sub-Example

While users come straight to example.com or www.example.com, I am redirecting them to shop.example.com through this .htaccess rewrite:
Code:
RewriteEngine on
RewriteCond %{ HTTP_HOST} ^www.example.com$ 
RewriteCond %{ HTTP_HOST} ^example.com$ 
RewriteRule ^ (.*) $ http://shop.example.com/ [R=301, L]
The information served by shop.example.com has the below tracking code parameters:
Code:
Var _gaq = _gaq || [];
_gaq.push (['_setAccount', 'UA-123456-7']);
_gaq.push (['_setDomainName', '.example.com']);
_gaq.push (['_trackPageview']);
Every direct visit which comes to shop.example.com as an outcome of the rewrite from example.com are tracked as transfer traffic, showing my personal example.com as transfer source in Google Analytics. I would like to track these visits as straight traffic. How to alter the configuration to track mod_rewritten traffic on my sub example arriving from my personal domain as straight traffic?
Reply With Quote
  #3  
Old 20-01-2011
Member
 
Join Date: Jun 2009
Posts: 758
Re: Is there any way to Track 301 Redirected Sub-Example

You can make ineffective the referrer that Google Analytics is utilizing, read further in the documentation for _setReferrerOverride. To someway give this accurate referrer, you require passing it through the 301 redirect. I can recommend adding a query parameter to your forwarded URL, and writing a JavaScript clip which will take out this information from the document.location. An instance of adding JavaScript to your Google Analytics code:
Code:
var _gaq = _gaq || [];
_gaq.push (['_setAccount', 'UA-XXXXXXX-1']);
var _from = unescape(window.location.href.replace(/.*[?&]from=(.*)/,'$1'));
if (_from && _from.length > 0) {
  _gaq.push (['_setReferrerOverride',_from]);
}
_gaq.push(['_trackPageview']);
And, an instance of utilizing mod_rewrite to move the referrer, if a referrer exists:
Code:
RewriteCond %{ HTTP_HOST} ^example.com\.com$ [NC]
RewriteCond %{ HTTP_REFERER}! ^$
RewriteCond %{ HTTP_REFERER} (.*)
RewriteRule ^ (.*) $ http://shop.example.com/$1?from=%1 [R=301, QSA, L]

RewriteCond %{ HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^ (.*) $ http://shop.example.com/$1 [R=301, L]
You will require replicating the over for www.example.com too.
Reply With Quote
  #4  
Old 20-01-2011
Member
 
Join Date: Nov 2009
Posts: 566
Re: Is there any way to Track 301 Redirected Sub-Example

I have a trouble that is bugging the heck out of me. My business has associates which sell our online creation. They provide affiliates this URL to put a link to our site www.example.com/?lgr=12334334 so while a user buy via that link, they get the credit. This URL redirects to a sub example of our site: affiliates.example.com. Our developers were quite convinced that Google would treat the sub example as a split site. The information on our sub example site is way additional immature and optimized than the main site: example.com. It is a totally dissimilar design and has 2/5 of the content.
Reply With Quote
  #5  
Old 27-01-2011
Member
 
Join Date: Nov 2009
Posts: 719
Re: Is there any way to Track 301 Redirected Sub-Example

I will have to converse to the developers regarding the weblogs. I would say a few things are not preferably setup in the backend that is why we are running into this trouble. For instance, I at present can't track affiliates in analytics (split out the conversions from our individual).They have been utilizing affiliates this way for a short time. It is just now that as I am checking our rankings, they perceive the possible damage in the way affiliates are handled. We do utilize .asp; however I can observe the warning possibly a potential trouble for them.
Reply With Quote
Reply

  TechArena Community > Technology > Technology & Internet
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Is there any way to Track 301 Redirected Sub-Example"
Thread Thread Starter Forum Replies Last Post
Getting redirected to Gigabase.ru PPandey Technology & Internet 3 10-09-2012 05:39 PM
Converting Mono track into stereo track using Audacity Non-$ensoi Windows Software 8 11-03-2012 11:48 AM
iTunes cannot keep the track of older track Mattador Windows Software 4 28-04-2011 05:45 AM
Links are getting redirected Rampage Technology & Internet 5 02-02-2011 07:46 AM
Webpage redirected due to DNS error #Dakota# Networking & Security 4 31-01-2011 11:08 AM


All times are GMT +5.5. The time now is 02:56 PM.