1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What's The Best Way To Setup Google Analytics Doing A 301 Redirect

Discussion in 'White Hat SEO' started by meakerseeker, May 19, 2011.

  1. meakerseeker

    meakerseeker Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    385
    Likes Received:
    23
    I've signed up for Google Analytics and have some videos on YouTube
    that are going viral & the domain I have is setup with a 301 Redirect.

    How can I setup Google Analytics to still track the stats doing a redirect
    to still make it work ok.
     
  2. gorzo

    gorzo Newbie

    Joined:
    Nov 15, 2009
    Messages:
    23
    Likes Received:
    6
    I could be wrong here... but I don't think it will work... Google Analytics is Javascript and requires the page and obviously its code to be loaded in order to track. So if you setup the 301 redirect on the server level (.htaccess) it will never load. You might want to try a PHP redirect.
     
  3. meakerseeker

    meakerseeker Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    385
    Likes Received:
    23
    It makes sense.