This can be done by adding source code and/or subsource codes arguments to the URLs when inserting the URL into the external site. For instructions on how to add source and subsource codes, review this article.