Add Google analytic Tracking Code to the header.php file
1. Log in to your WordPress dashboard and navigate to Appearance » Editor.
2. Now click the header.php file on the right-hand side below the Templates section.
3. Paste the tracking code you just copied from your Analytics profile before the closing tag.