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 want to use Google Analytics on a website that uses both HTTP and HTTPS that works as explained below:

  1. Secure pages accessed through https://mydomain.com/secure/* are always on HTTPS. Any access to these pages through HTTP will be redirected to HTTPS.
  2. Any other pages will be accessible through both HTTP and HTTPS

I have a Google Analytics profile with URL using HTTPS. Will I cover all traffic? Do I need to create another profile using HTTP and how should I apply the other profile?

share|improve this question

migrated from webapps.stackexchange.com Aug 8 '13 at 22:43

This question came from our site for power users of web applications.

add comment

2 Answers 2

The same tracking code will capture all traffic to your site, no need for separate profiles or duplicate codes. Follow best practices for SEO though and use canonical tags for the pages accessible in both http/https and 301 redirects for the non SSL pages redirecting to SSL versions.

share|improve this answer
add comment

You should use the same Google Analytics tracking code on both your HTTP and HTTPS pages so that you can view a summary of all your traffic. If you use separate tracking codes, you will only have access to separate reports and not be able to easily see aggregate statistics.

share|improve this answer
    
Thanks for your response Stephen Ostermiller. So it doesn't matter I use either http or https for default URL in my property setting? Thanks. –  Pelangi Aug 12 '13 at 4:29
add comment

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.