Thanks for answer. No I read that “ajaxurl” exist only in admin part and I think to use it for test:
-if "ajaxurl " exist - it mean that it is admin part of site
-if "ajaxurl " not exist - it mean that it is frontend of site
This is correct but it’s common for other plugins to load it on the frontend so this is not going to be a reliable check for you. @tommusrhodus has a great suggestion.