How to add Google Analytics tracking code your site if you use WordPress?

1. You get the tracking code from the admin section of Google Analytics:

2. You add that code right after the in all the pages you want to track.
To do this, you can add the code in the header.php file of the current theme of your WordPress site.