5

We had a website http://mainsite.com that has a subdirectory subsite at http://mainsite.com/subsite.

We've split that subsite off into http://subsite.com/

We are still tracking the subsite by using the orginal tracking code ID 12345-1 on both domains, while giving both individual sites their own new tracking IDs.

The problem is that in this combined view, all subsite pages have new paths now. What was /subsite/some-title-here is now /some-title-here, which breaks analytics history.

How can I fix this? It's not exactly an address change — mainsite.com still exists. Is there a way to prepend paths conditionally on host name?

1

You can't change historical Google Analytics data, however you can change new data that is coming in. If you want your new URLs to share history with how they used to be, you can filter them as they come into GA to make them appear in GA in the old format.

Create a profile data filter in Google Analytics. Use the search and replace option to replace subsite.com/ with mainsite.com/subsite/

There are illustrated step by step instruction for the process here: https://www.clickinsight.ca/blog/rewriting-urls-google-analytics

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.