How to Continue Using Your Google Analytics Account When Switching Domains

paste code for analytics set up instructions.

What happens to your Google Analytics data if your business is building a new website on a new domain? Are you able to keep your old data and continue tracking visitor data as if your site never moved? The answer is ‘Yes!’ It’s very easy to do and this post will show you how to do it.

Add the Analytics Tracking Code

First, you need to add the Google Analytics code that’s being used on your current site to the new site. Here’s how to find it:

  1. When logged into Analytics, click on the gear icon that’s in the right corner of every screen
  2. Click on the ‘Tracking Code’ tab
  3. Your site’s code appears in the box below ‘Paste this code on your site’ Just like when you implemented Analytics on your old site, this code needs to be added to the code of every page of your new site, just before the end of the head section.

paste code for analytics set up instructions.

 

Change the Property Name

Next, go to the ‘Property Settings’ tab of the same account settings screen. Now, just change the ‘Property name’ and the ‘Default URL’ fields to your site’s new address. edit settings instructions for analytics set up.

Change the Website URL in Each of Your Profiles

Finally, if you have multiple profiles in your Analytics account, you’ll need to change the website URL within each profile. To do this, click on the ‘Profiles’ tab in the Analytics settings screen. The existing profiles for your account appear in the drop-down menu.

add the domain url - analytics set up instructions

Select a profile. In its settings area, you need to change the ‘Website URL’ field to the URL of your new site. If you’d like, you can also change the ‘Profile Name’ so that it reflects your new address. Repeat this for each of your profiles. One thing to keep in mind is that if your profile use filters based on pages on your old site, you’ll still need to update the filters to reflect the addresses of the pages on your new site.

edit profile information - analytics set up instructions

That’s it! Your Google Analytics account will now track the visitor data from your new site while keeping continuity by preserving the data from your previous domain.