The most direct method would be to pull a clickstream level data feed of your existing data.
Here's a jumping off point: The Data Feed Toolbox – Tools for crafting elegant big data solutions
There isn't really a great way to mirror adobe's back-end sessionization from a client-side collection standpoint.
I guess if you didn't care if your sessions lined up perfectly with adobe's you could create a session id, hold it in a cookie (or in sessionStorage) and include it in a prop or eVar on every beacon. If you have an adobe mid, you could just add a timestamp to it at the start of a visit on a cookie that expires in 30 minutes. With each hit you could add the same value and reset the cookie expiration. This would get you pretty darn close (and maybe that's close enough for your immediate needs).