To use Google's Analytics tool for free you will need to have a Google account.
Simply go to
http://google.com/analytics/
to log in to google analytics.
Create a new website/property
Copy the code on the screen below into the box that says google analytics under website settings.
A more detailed guideline can be found on Google at the link below
https://support.google.com/analytics/answer/1008080?hl=en