These kind of complaints are based on a misunderstanding of how JS works or how the browser works.
You can do the same exact thing in JS right now. In fact, if anything, JavaScript makes this way easier than WASM. With JS, you can just use something like Rollup or Webpack to put your analytics code in the same code.