Installation using the Joomla Template Manager
1) Log in to the Joomla administrator panel.
2) Go to Extensions -> Templates -> Templates
3) Click the name of the template that is used by default on your site from the list of templates displayed (it will be indicated by a gold star)
4) Click on the "Edit main page template" button to open the template editor.
5) Locate the closing </body> tag in the template code.
6) Add your code before the closing </body> tag.
7) Click the "Save" button to save your changes.