You can use various methods to add the tracking code to your website, depending on your website's platform and your level of technical expertise. If you are using a website builder or content management system (CMS), there may be an option to add the tracking code to your website's settings. Alternatively, you can manually add the tracking code to each page's HTML code, either by editing the code directly or by using a plugin or extension that can add the code for you.
To summarize, you should put your Google Analytics code just before the closing tag of your website's HTML code.
Yes, that is correct. The Google Analytics tracking code should be placed just before the closing tag of your website's HTML code.