Google Analytics seems to be affected after setting preferred domain

by Ann   Last Updated January 13, 2018 17:04 PM

I hope you can assist me with this! I've recently changed the preferred domain for my site https://example.com. Unfortunately, after doing so, it appears that views/visits are no longer being recorded by Google Analytics. I've edited the URL in GA's Admin settings to indicate that it is now https://example.com - perhaps it just needs some time to settle in?

Also, I'm not quite sure if I've set up the 301 redirect correctly after setting my preferred domain.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.YourDomain.com$ [NC]
RewriteRule ^(.*)$ http://YourDomain.com/$1 [R=301,L]

If I have an HTTPS site, do I need to add the 's' to the sections that contain 'HTTP'?



Related Questions




Google Analytics problem with events

Updated April 10, 2017 14:04 PM


How to use segments in google analytics API

Updated May 13, 2015 12:39 PM