We run a SAAS analytics app similar to hotjar and Google Analytics. The customer needs to install our javascript on their website in order for us to track.
How do we validate if this script has been successfully installed on their site and it loads? (We know the domain)
(The current approach is to call an API from the script on load) and (the second approach is to scrape the page to verify if the script exists)
The script will pass an API post if it loads. However, if the script is used in any test site then it may create a false load. I am wondering what the industry standard is here as this scenario is used across all the installation script sites.