First you’ll need to go to Google Analytics and get the tracking code to put on your website.
If your theme has the option to add the code in the theme option then you can paste the tracking code there. If not, you’ll need to download the plugin.
There are lots of plugin available which does the job. For this demonstration, I’ve used ‘Insert Headers and Footers’ plugin.
You basically paste the code in there. That’s it.