We have a website, www.example.com which has Google Analytics installed.

We have another website, www.example2.com which has it's own separate Analytics tracking code.

We are rebranding and moving www.example2.com so that instead of being on its own domain, it will simply work from inside a folder of www.example.com - for example www.example.com/example2

If we want to set up Analytics for example2 what is the best way to do this? Two appraoches come to mind:

  1. Put the Analytics code for www.example.com on to www.example.com/example2. Use Analytics to segment traffic that contains /example2 (and anything following it) in the url.

  2. Generate another Analytics tracking code for www.example.com/example2 - I'm not actually sure whether this can be done.

I believe Google considers both sites as "one website" due to this folder set up?

Any advice appreciated.

1 Answer 1


I think the issue here is whether you need historical data for example2.com. If you need historical data for easy comparisons, then you should probably keep the old UA tracker for the sub folder and maintain the data flow. Even If not, implementing multiple trackers for example2 sub folder seems like the best solution. Then you'll have both options available.

  • So do you mean change the 'Default URL' to www.example.com/example2 on the existing Analytics Property for www.example2.com? That way we would retain the historical data (that would be good) and Analytics would still be treating them as 2 separate properties?
    – Andy
    May 17, 2018 at 13:58
  • No need to change anything in GA interface. You will still have the same 2 properties, the one belonging to example2 will still receive data, but only from users entering example2 sub folder. The master account will record all the traffic, including the sub folder (which you can segment or create a different view for). You just need to add the extra tracker (example2 UA-xxxx-xx) to all pages under this sub folder May 17, 2018 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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