How to implement Cross-Site In-Session Sitecore Analytics

I came across this weird scenario wherein we were migrating old legacy project coded in Vb.net into Sitecore. So during this process, we had to migrate in a prioritized manner which made difficult to share analytics across two different projects. So I have just noted down what I did in order to accomplish the same. Assume we have a scenario with two different projects which are utilized for same Website (Some pages in Sitecore and Some pages in any other framework ). Let's Assume Sitecore Project named as " CodeYourWaySitecore " and other project named as " CodeYourWayLegacy " For CodeYourWaySitecore and CodeYourWayLegacy (“ CodeYourWayLegacy.demo.com ” and “ CodeYourWayLegacy.demo.com ”) are hosted on different websites. By default in session, analytics work for each individual site. Identifying and merging contacts at the end of the session allows for post-session interactions(assuming the contacts have ...