Results 1 to 5 of 5

Thread: Is there any way to Track 301 Redirected Sub-Example

  1. #1
    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.

  2. #2
    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?

  3. #3
    Join Date
    Jun 2009
    Posts
    761

    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.

  4. #4
    Join Date
    Nov 2009
    Posts
    569

    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.

  5. #5
    Join Date
    Nov 2009
    Posts
    721

    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.

Similar Threads

  1. Getting redirected to Gigabase.ru
    By PPandey in forum Technology & Internet
    Replies: 3
    Last Post: 10-09-2012, 05:39 PM
  2. Converting Mono track into stereo track using Audacity
    By Non-$ensoi in forum Windows Software
    Replies: 8
    Last Post: 11-03-2012, 11:48 AM
  3. iTunes cannot keep the track of older track
    By Mattador in forum Windows Software
    Replies: 4
    Last Post: 28-04-2011, 05:45 AM
  4. Links are getting redirected
    By Rampage in forum Technology & Internet
    Replies: 5
    Last Post: 02-02-2011, 07:46 AM
  5. Webpage redirected due to DNS error
    By #Dakota# in forum Networking & Security
    Replies: 4
    Last Post: 31-01-2011, 11:08 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,084,646.99641 seconds with 17 queries