> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Google Analytics with Joomla

> Discover how to integrate Google Analytics with Joomla for insightful visitor statistics. Follow our simple guide to get started!

This article discusses several ways you can use Google Analytics with a Joomla site.

## Using Google Analytics with Joomla

Google Analytics provides detailed statistics about visitor traffic to your site. To use Google Analytics with Joomla (or with any other type of site), you must first sign up for a Google Analytics account at [http://www.google.com/analytics](https://www.google.com/analytics) and obtain a unique Tracking ID.

After you have set up a Google Analytics account and have the Tracking ID for your site, you can configure it for Joomla. There are two ways to do this:

* Use a Joomla extension.

* Edit the Joomla template.

### Method #1: Use an extension

There are numerous extensions that enable you to configure Google Analytics for a Joomla site, and they all function in essentially the same way—all you have to do is specify your Tracking ID, and the extension takes care of the rest.

Here are some popular Google Analytics extensions for Joomla:

* [Google Analytics](http://nicheextensions.com/downloads)

* [Google Analytics Dashboard](http://extensions.joomla.org/extensions/extension/site-management/analytics/google-analytics-dashboard)

* [Advanced Google Analytics](http://extensions.joomla.org/extensions/extension/site-management/analytics/advanced-google-analytics)

<Note>
  To view a complete list of Google Analytics extensions on the official Joomla site, please visit [http://extensions.joomla.org](http://extensions.joomla.org).
</Note>

### Method #2: Edit the template

Extensions are convenient, but they also carry processing overhead with them that can affect site performance. If you prefer not to use an extension, you can edit the Joomla template directly to enable Google Analytics for your site.

<Warning>
  **Important**

  One disadvantage of editing templates directly is that if Joomla is updated, the modifications may be overwritten. For information about how to avoid this scenario, please visit [https://docs.joomla.org/J3.x:Modifying\_a\_Joomla!\_Template](https://docs.joomla.org/J3.x:Modifying_a_Joomla!_Template).
</Warning>

To enable Google Analytics by editing the template, follow these steps:

1. Log in to your Google Analytics account, click **Admin**, click **Tracking Info**, and then click **Tracking Code**. Copy the entire text in the tracking code box, including the starting `<script>` tag and the ending `</script>` tag.

2. Log in to Joomla as the administrator.

3. On the top menu bar, click **Extensions**, click **Templates**, and then click **Templates**.

4. Click the name of the template you want to modify.

5. Select the file in the template that you want to modify, and then paste the Tracking ID code snippet from Google Analytics that you obtained in step 1.
   > 🚧 Important
   >
   > Make sure you include the starting `<script>` tag and the ending `</script>` tag.

6. Save your changes to the template file, and then reload your site in a web browser. Examine the page source code to verify that the Google Analytics code is loaded.
   > 📘 Note
   >
   > It can take up to 24 hours for Google Analytics to change its status from **Tracking Not Installed** to **Receiving Data**.

## More information

For more information about Google Analytics, please visit [http://www.google.com/analytics](https://www.google.com/analytics).
