Ask Dan: SEO Questions #1
Hangouts on Air: Dan Petrovic answers SEO related questions live on Google+
Join here: https://plus.google.com/events/coeknc5obvn7mnesv08294jk40s
Hangout Participant Contribution:
Regarding the discussion about changing domain names & Google Analytics, you shouldn’t need to create a new profile for the new domain name. For example, if you are using domainA.com and you move to domainB.com – you can continue to use the same Google Analytics code from domainA.com on domainB.com.
To keep things tidy, I go into the admin area for that particular Google Analytics web profile and update the domain settings and so forth.
You will see a change in your visitor/visits data however, as the Google Analytics cookies used to track visitors, visits, traffic courses, campaigns, custom variables and so forth will not be valid for your new domain. As such, when the visitor is initially redirected from domainA.com to domainB.com, Google Analytics will start a new set of cookies for their browser on the new domain.
For most websites, the issues raised above will make very little difference in the grand scheme of things and can be ignored. However if you’ve got an ecommerce website, or if you are heavy on different types of marketing (pay per click, social, email, radio, ..) or if you use Google Analytics custom variables – this is going to pose an issue.
Consider a simple example where I set a Google Analytics custom variables to identify the visitors age bracket and gender after they provide that information via a form at some point. When they are redirected, that data is no longer available on domainB.com and as such, custom reporting that you might have setup wouldn’t work until those custom variable cookies were recreated (maybe you ask them to update their details every six months for example).
To work around this problem and it isn’t something that an average webmaster would do, you’d use a custom set of redirects 301 redirects where you not only redirect the user from page to page but you read in the Google Analytics cookies from domainA.com and re-create them as part of the 301 redirect for domainB.com.
As a result of transferring the cookies across from domainA.com into domainB.com, Google Analytics will continue to function as expected & won’t miss a beat.