Ask Dan: SEO Questions #1

Hangouts on Air: Dan Petrovic answers SEO related questions live on Google+

Join here:

Hangout Participant Contribution:

Alistair Lattimore:

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 and you move to – you can continue to use the same Google Analytics code from on

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 to, 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 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 and re-create them as part of the 301 redirect for

As a result of transferring the cookies across from into, Google Analytics will continue to function as expected & won’t miss a beat.

Google Analytics actually provide methods (_link(), _linkByPost()) as part of the Google Analytics JavaScript API to handle this sort of scenario (though for a slightly different purpose) when your website setup crosses over domains, such as &

Ask Dan SEO Hangout


Dan Petrovic, the managing director of DEJAN, is Australia’s best-known name in the field of search engine optimisation. Dan is a web author, innovator and a highly regarded search industry event speaker.

More Posts - Website