Step 1: Log into the Joomla administration panel
Step 2: Click the Template Manager link
Step 3: Click the Templates tab
Step 4: Locate the template your site is using, then click on its title
Step 5: Click the Edit main page template link
Step 6: At the bottom of the code, locate the </body> tag and insert your tracking code above it
Step 7: Click the Save & Close button