Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a website that I'd like to track properly with Google Analytic. The main site is just MySiteExample.com. There is also a store setup so we are using https on part of the site. My question is do I create different profiles for each variation of the domain name? If yes, do I embed all 4 of them one after another?

URL Variations:

  • MySiteExample.com
  • www.MySiteExample.com
  • https://MySiteExample.com
  • https://www.MySiteExample.com
share|improve this question
    
This is very similar to webmasters.stackexchange.com/questions/51698/… –  Stephen Ostermiller Aug 18 '13 at 10:37

2 Answers 2

If you look at the example JS code at the Google Analytics help, it does not matter whether e.g. index.html is served through http://www.mysiteexample.com/index.html or https://www.mysiteexample.com/index.html, as both will trigger the same tracking event. If you serve different content depending on whether the protocol is https or not (i.e. two different index.html, if we stick to my example), see this question.

Without a good reason you should not serve exactly the same site at http://mysiteexample.com/ and http://www.mysiteexample.com/. That makes SEO worse, messes up bookmarks and links etc. Decide if you want to serve the site from www or not, and set up a redirect for the other version. See e.g. this question for details how to do this on the Apache web server.

share|improve this answer
    
Thanks @bhell can you clarify when you say "Without a good reason you should not serve exactly the same site at mysiteexample.com and mysiteexample.com/"; I'm not sure if you're saying I should not have an https added to my Google Profile or if you mean I should use the https or http throughout the entirety of the site. –  Christina Rule Aug 19 '13 at 1:01
    
I meant that it is generally not a good idea to serve the same page from two different URLs with and without www. They are called "Unique Resource Locators", and uniqueness is not having two different URLs pointing at the same resource... –  bhell Aug 19 '13 at 14:34
    
Thanks @bhell what about for the https? –  Christina Rule Aug 23 '13 at 10:01
    
Is e.g. index.html served through http different from index.html served through http? Do you want to track these two resources separately? If you don't, you don't need to worry about the protocol. The tracking code in index.html will trigger the same tracking event in GA when served through either protocol. –  bhell Aug 23 '13 at 14:30

You can use 301 redirects & Canonical Meta tags to address the issue here.

Select the url scheme you want to follow & then apply 301 redirects to other type of urls. This way your page ranking & weight will be preserved.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.