- Login wordpress admin panel
- Goto Appearance > Editor (theme editor)
- Select the footer.php or index.php
- Find the </body> html tag
- Copy and page the Google Analytics code before the </body> tag.
- Don’t forget to click Update File to save changes.
Decoding the Secrets of WordPress