Changing a domain in Google Analytics between http://www.yourwebsite.com and http://yourwebsite.com doesn’t cause GA to lose data or corrupt in any other way.
I first tested this, and wrote the original version of this post, in November 2012. Google Analytics has changed a lot since then so here’s an update on how to do it.
Why did we need to change our Google Analytics domain in 2016?
In mid-2015 we launched the first version of our website onto our domain www.zanzidigital.co.uk.
Zanzi evolved quickly as a business, and it wasn’t long before the website needed some major updates. These went live in mid-2016 and for reasons known to themselves, the developers implemented the new design onto http://zanzidigital.co.uk.
We decided not to move the site back to the www version of the site for 3 main reasons:
- we didn’t believe it would make much difference
- it gave us a chance to experiment and see what difference it did make
- leaving it on http://zanzidigital.co.uk, would give us the opportunity to change the domain in Google Analytics and update this post.
But this did mean we’d need to change the domain in Google Analytics. Here’s how to do it:
How to change your domain in Google Analytics
1. Click on the ‘Admin’ label in the main menu
2. In the middle column, click ‘Property Settings’
3. Change the Property Name and the Default URL
4. Then scroll down, hit save, and you’re done!
It really is as simple as that. Google Analytics will report accurately on your site, as will any other research, reporting and analysis tools that you have.
For the record, here’s the original post I wrote in November 2012:
When we audit a client’s website for the first time, we quite often find that although the site is on a ‘www’ domain, their Google Analytics (GA) profile has been set up on the ‘http’ version of the domain.
And if the site’s been set up properly and http redirects to www – or vice versa – this can cause problems: because GA sees the ‘www’ and ‘http’ versions of the site as two different websites.
The problems that this creates aren’t huge: in fact GA works fine across the two versions of the site in all areas except for In-Page Analytics. To be honest, I don’t use In-Page Analytics much, but it can provide additional nuggets of information to help paint a full picture of a website.
Google Analytics best practice
It’s worth noting that no single report, statistic or dimension can tell the whole story about your website’s health. Best practice is therefore more about bringing lots of things together to tell the story. And then combining them in a way that helps you to make informed judgements and invest your hard-earned marketing budget as wisely as possible.
In mid 2012 we came across this situation with one of our large charity clients: the site was set up on the http://www domain, GA was implemented to http://
I wanted to correct it, so we could see what insights might be offered by In-Page Analytics. I’ve known for a while that it’s possible to change the domain settings in GA but I’ve not been sure whether it would lead to historical data being deleted from the account. I could find just one good clear article on the subject, by Anna Lewis from Koozai.
Anna does a great job of explaining the topic, but as hers was the only good article I could find, and the stakes were high if we lost the client’s historical data, potentially loosing 2 years+ of tracking data, I decided not to make the change.
Fast forward to November 2012
In November 2012 we reviewed our new client’s website Silver Bee and found that the site was at www.silverbee.co.uk and GA was set up on http://silverbee.co.uk.
We wanted to review In-Page Analytics because, as an e-commerce site, we were interested in how much of a product page could be seen ‘above the fold’. Since the site was very new and GA has only a few weeks data in it, the client allowed us to reset the domain and see what happens.
We did this by following Anna’s excellent article. GA had slightly evolved since she wrote it so here’s the process I took:
Update Domain URL in Google Analytics
- From your Account Home page – the very first one you get to in GA – select the property you wish to edit
- From the top right corner of the page, click ‘Admin’ – in the orange bar
- Select ‘Property Settings’
- Change the ‘Default URL’ from http://yourdomain.co.uk to http://www.yourdomain.co.uk
- Scroll to the bottom of the page to apply the changes
- Bonus point: before clicking ‘Apply’ you can connect up your Google Webmaster Tools account if you haven’t done so already.
Now go back up to the top of the page and click ‘Standard Reporting’. You’ll see all the historical data still in there.
Update Google Analytics Profile Names
- From the top right hand corner click ‘Admin’ – in the orange bar.. same as last time
- Select the profile name – if you have more than one you’ll need to do this for all of them
- Select ‘Profile Settings’
- Change the website’s URL from http://yourdomain.co.uk to http://www.yourdomain.co.uk
- Scroll to the bottom and click ‘Apply’
- Bonus point: if you’ve found that, although your site has site search, the data is not feeding into GA, there’s a setting on this page that needs to be enabled.
And… you’re done. With no loss of historical data.
We’d love to hear your experiences of changing domain names in Google Analytics, let us know in the comments below.