I currently have this code to check the website URL GET options for a specific ID, but whenever this code is run, I get a weird error: Uncaught TypeError: Undefined is not
Uncaught TypeError: Undefined is not
window.location is a Location object, not a string, and indexOf is a String (or Array) method.
indexOf
If you want to search the query params, try
window.location.search.indexOf(familyId)
or if you want check the whole url,
window.location.toString().indexOf(familyId)