I'm currently using the plugin-google-analytics in a Docusaurus site. It works well, is out of the box, super easy to set up. My question is, whether someone is aware if it's possible to toggle off analytics with JavaScript. I ask because I have this requirement I need to fulfill. In other sites where I've worked with GA (Google Analytics), I would just follow this strategy whereby the following spinnet would do the job and disable analytics.
window['ga-disable-GA_MEASUREMENT_ID'] = true;
However, this same strategy is easily applied to the Docusaurus site, I guess it's because since it's statically compiled there's no way to disable this?
Does someone have experience with this particular scenario?
Thanks