URL Based Custom Groups

I'd love to be able to create a custom group based upon the current url. Using a Window Name: Facebook for example doesn't really provide what I want as Facebook changes the Window Title for every page. Another issue with this set up is if I am say on here and reading something about YouTube, then my YT bar comes on.

I have been looking into custom variables as a workaround also, but still not completely understanding. I'm not exactly an expert in scripting. Thanks!

currently the only way to achieve that is by using browser extensions that put the url into the window title (for Chrome e.g. https://chrome.google.com/webstore/detail/add-url-to-window-title/ndiaggkadcioihmhghipjmgfeamgjeoi )

Do you know of any extensions for Safari?
I found a script in AquaTouch earlier today which seems to be working well.
It sets BTTcustomvariable 3 to allow for proper touchbars to show up.

Y'all are geniuses!