let referrerUrl = document.referrer;
let referrerUrlMatch = referrerUrl.match(/^https?:\/\/www\.(venetian|palazzo)\.com(?!\/meetings(\/|$))/);
let referrerName = referrerUrlMatch ? referrerUrlMatch[1] : null;
At that point, referrerName is either “venetian", "palazzo", or null (if referrer URL was from neither of the two sites, or if the path started with “/meetings/“), and the referrerUrl can be used as needed.
Examples: "https://www.venetian.com/meetings” returns null "https://www.venetian.com/meetings/“ returns null "https://www.venetian.com/meetings/test.html” returns null "https://www.venetian.com/meetings/something/meetings/“ returns null "https://www.venetian.com/meetings.html” returns “venetian” "https://www.palazzo.com/test.html” returns “palazzo” (And palazzo.com/meetings hard-redirects to the venetian.com/meetings anyway) To be tested, of course.
(snippet provided by Silvan)