gareth asked this 7 years ago

How does HTTPS migration affect Google Analytics?

I am forcing HTTPS on my domain using .htaccess

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

But my Google analytics property is still http. Should I add a new https property? Or should I edit the old property to https?


Best Answer by pseudoFish 7 years ago

If you are forcing HTTPS then its safe to set default URL protocol to https in GA Property Settings. For you all pages are forced to HTTPS hence default URL should be https. You can change the property to https, no need to add new property. If you edit the same property then you can retain all historic data, tracking ID is the same, no other change is required.

mohlal 7 years ago
2 likes

I changed the property to https for my websites and did not lose historic data. For all my sites previous analytics data is still available after I changed Propert Setting -> Default URL -> https://mysite.com

sonja 7 years ago
1 like

Well you are supposed to update the Google Analytics Default URL Protocol to https after migration. However the tracking is tied to the tracking ID , so the old property still can show https traffic as well. I migrated some parts of my site to HTTPS,but still have few pages that are on HTTP. Still using old http property for tracking and it seems fine, shows both http and https traffic, I am worried if I create new property i will lose all previous data.