Hello @ocio132 and thanks for getting in touch. This is something that has been discussed in the past and is not something we support. While hosting locally may be possible it’s not recommended as per?Google Analytics guidelines.
This was also discussed in a past GitHub issue where it was confirmed that self-hosting Google service JS files is not recommended. Improvements for this are always actively being worked on to improve performance for the scripts used by websites across the web. You can also find more insights on Front-end performance with Site Kit in our page here.
I hope this helps to answer your question but if you have anything else you’d like to ask then please do so and I will be happy to help.