How to setup Google Analytics?

I want to install Google Analytics on my WordPress website. How can I implement it easily? I know there are some plugins that allow inserting Google Analytics code. But I do not want to use any plugins just for adding a Google Analytics code to my website because it might make my website is slow. Please help me with some methods to add Google Analytics without a plugin to my WordPress website.