Get UTM parameters after page navigation

My goal is to somehow extract or get UTM values after I've navigated through the website.

My optimal website flow would go like this:

Click link from some kind of medium -> 

https://mywebsite.com/?utm_source=google&utm_medium=email&utm_campaign=my_campaign ->

https://mywebsite.com/buystuff ->

https://mywebsite.com/transaction ->

https://mywebiste.com/thankyou ->

I know I can use javascript to get utm parameters from the url with

window.location.search

But that's only for the landing page

How can I get UTM values after I've navigated through my website pages? Once I'm in my transaction or thank you page, how can I get UTM values? Are they stored in some kind of storage?

Should I use session storage to store UTM parameters once I'm in landing page? If so, would there be any risk of UTM params being manipulated?

Thank you