We separate our site into .com and .co.uk (maybe other domains) to improve our visitors' experience and also to help us better understand our visitors in different locations. Sometimes, we may also want to collect all the sites' data together to make the data more exactly. For example when visitors search a term from google to our .com site, then go to .co.uk site, we will hope google is our source. But if we do not collect all the data together, Google analytics will make .com site to be the source of .co.uk.
How should we do to track multiple top-level domains, in fact Google Analytics have customized the code for us, in your Ga center Admin->Tracking Code
Choose Multiple top-level domains, Iif you have used one top domain code, you will easy to understand this code. Copy the code and paste the code to all your domains' page, then test for about one week to make sure all the code is ok. You are successful to collect all your data together now, so easy.