- Login to Joomla
- Select Extensions, then Template Manager, then Site Templates
- Click the circle next to the current theme then click the "Edit" button towards the top
- Click the "Edit HTML" button in the upper right hand corner
- Scroll down to the bottom and paste the code just before the
- </body></html> code
- Click the Save button at the top
The StatCounter code should now be active on your site.
Depending on the template you currently use, steps 3 and 4 may be slightly different.
Instead of checking current template, straight click on it and then find "Edit HTML" link next to name of template.
After adding counter code, if you receive the error message "file index.php could not be saved"; that directory and file itself don't have writing permissions.
So chmod them from control panel, and then save.