Here is the google analytics plugin for wordpress. You have to install this plugin using standard installer. After installing the plugin you have to set the settings for this plugin. Before adding the settings you have to login to your google account. And after logging in go to google analytics. In google analytics create a new account if you want to add new account. If you already have account and if you want to add this website to it, just add a new property in the selected account. After adding the property to your account just go back to your wordpress site again.
This time click on the update your profile settings. Here it asks goes to your google analytics account and asks you to grant access to your analytics account. If you allow it to grant access, then the settings page will come and you’ll be allowed to choose the property that you have created in analytics page. Once you have accessed settings and updated, the tracking code gets executed. And tracking starts