You don't need framework libraries. The point is, for many frameworks installing GA is just adding one file to your dependencies and entering your UA number. Installing a comparable tool that doesn't have a library involves marginally more friction.
To handle single page sites or more specific actions