Mobile app version of vmapp.org
Login or Join
Cofer257

: Google analytics best way to handle https, http, www, and no www I have a website that I'd like to track properly with Google Analytic. The main site is just MySiteExample.com. There is also

@Cofer257

Posted in: #GoogleAnalytics

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 MySiteExample.com MySiteExample.com https://www.MySiteExample.com

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sue5673885

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.

10% popularity Vote Up Vote Down


 

@Nickens628

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 www.mysiteexample.com/index.html or 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 mysiteexample.com/ and 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme