If you are the owner of the other website and can make changes in the code, it is similar to implementing Analytics on your own website. You just need to keep the tracking server and report suite same.
To be able to answer your query I need more clarity on the ask. Are you saying that the third party site doesn't have Analytics implemented on it? If yes, then you can track the data via exit links. For example, if I have two web sites like abc.com & test.com. We have Analytics implemented on abc.com but not in test.com. So, in this scenario, I will capture the data on the button or a link that is directing me from abc.com to test.com. You can also try using the Exit Link Redirects. For more information on Exit Link Redirects, you can also refer to the below documentation link.