To install google analytics on your website, you need to create an account, set up a property, and add the tracking code to your site's html. The code should be placed just before the closing tag to ensure accurate data collection. Once added, google analytics starts collecting data from your website.