Copy current url to variable

After much trial and error with Navigation, I finally have it working. The fly in the ointment was that my HA Companion is configured to always load HA via my Nabu Casa account, requiring the complete Nabu Casa URL link in order to navigate to a different Lovelace dashboard view. That being done, I am now looking for a method to return from that called view back to the view it was called from. My thought was to somehow copy the current URL into a variable when the new view is called and provide a button on the called view to return from whence it was called.
If there is a simpler method, I am all ears. I have several different dashboard configurations to accommodate different devices therefore using a fixed URL will not work.