Thanks for writing in!
You can add google analytics code in the header or footer.
Also, there is an addon called Google analytics, comes with theme. You can install and use that.
just go to X-> Validation in the extention section you can install this.
For more help please check this.