How to add Google Analytics code in Joomla! template

WebTechRiser.com > Joomla 2.5 > How to add Google Analytics code in Joomla! template

When you associate a Google Analytics web property with a site in your Webmaster Tools account, you’ll be able to see Webmaster Tools data in Google Analytics reports.

It’s a great, free tool to keep an eye on the number of visitors, other sites that point to your content, the most popular articles on your site, and much more. To set up Analytics on your site, you need to add a code to your site’s pages.

Step 1: Sign up

To use Google Analytics on your site, you need to set up a Google Analytics account. To do this, go to https://www.google.com/analytics. If you don’t have a Google account, first create one. If you already have a Gmail account, you can sign in to Google Analytics with your existing email and password.

Signup to Google

Click Create an account.

> Enter your Google account details and click Sign Up.

> Enter information on the site that you want to track. Fill in the following details:

  • An account name. Later you can add more accounts to Google Analytics to track multiple websites, so it’s a good idea to choose the site title as the account name.
  • The site URL (http://www.example.com)
  • Select the appropriate country and timezone.
  • Accept the Terms of Service and click Create account.

> Your account details are displayed. At the bottom of the page, a box appears with a special code. Don’t close the browser window, as you’ll need this code in the next step, to include it you your website.

Write necessary signup info bits
Setup your domain info
Google Analytics Code

Step 2: add the Google Analytics code to your website

  • Open FileZilla FTP client software and download the index.php file from your template folder on your Desktop.
  • Open the file using Notepad.
  • Find the closing </head> tag and just before this line paste your Google Analytics code here. Save the file.
  • Use FileZilla to upload the saved file (index.php) in your remote server’s template folder.
Also read:  How to Call a Model from Another Model in Joomla!
Paste Google Analytics code in Joomla Template

Step 3: view the Analytics data

Once the web pages on your site contain the tracking code, Google Analytics will start gathering information on site visits. You’ll have to be patient; it takes a day or so before the first results will be visible. As soon as Google Analytics has tracked visitors for a while, you can log in and view the site data. Sign in to Google Analytics. Click through to your account. You’ll get a list of visitors as shown below.

Google Analytics Report
Google Analytics Report

Step 4: start tracking!

Here’s a quick overview of what you can do with Google Analytics:

View the number of visitors per month

On the Google Analytics Dashboard, you’ll see a chart that displays the number of visits of the last month. You can change the date range and it’s also possible to compare the numbers of visitors in different periods. Other interesting information is displayed in a series of graphs: the number of visits, the number of unique visitors, page views, etcetera.

See where  visitors come from

Via “Traffic sources > Overview”, you can see where your visitors come from. Do they find your site through search engines, what other sites refer visitors to your site? You can also find out what other sites are linking to your site and see how much traffic they generate.

Find out what keywords are popular

On the Traffic sources page, you can  see which search terms people have entered into the search engine to end up on your site. This tells you which keywords are popular. Is your site found via the desired keywords?

Also read:  How to setup SMTP in Joomla to send emails

Find out which pages are popular

Via “Content > Overview”, Google Analytics displays the number of visits to specific  pages. This can help you to tailor site content to your visitor’s needs. What do your visitors find interesting? You can see which pages have little visitors (and thus less have to be displayed less prominently on the site, or need additional promotion), and you’ll see what content attracts visitors.

Do more with Analytics

Analytics allows you to do much more than you’ve read about in this article. It’s possible to set goals (an example of a goal is that people fill out an application form) and measuring conversion: how many people have achieved this goal? This way, you can track how effective your site is as a marketing tool or sales channel. You’ll find much information about the use of Analytics in the Google Help Center.

How often Google Analytics data are updated?

It can take up to 24 hours for all data to appear in your Google Analytics account after you’ve installed the tracking code.

Category Joomla 2.5

Leave Your Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.