Insights beacon

For the cloudflare insights beacon
https://static.cloudflareinsights.com/beacon.min.js
is there a need for it to be on its own domain?
It looks like it reports using mydomain/cdn-cgi/rum
couldnt it use something like mydomain/cdn-cgi/beacon.min.js ?
Would it work correctly if I just copied it to my domain and add it manually?

The insights beacon always comes from that domain and there is no way to change it. Even if you save it and deploy it from your own site (which I don’t recommend at all) Cloudflare is still going to load it from there as long as your sites are proxied.