In this Joomla blog you can get the latest news from www.JoomlaShine.com and Joomla related news, learn the web development techniques for site building, marketing and SEO tips and tricks, case studies.
Google Analytics is a highly recommended tool to check and analyze site traffic statistics. Almost all Joomla newbies know that they should install this tool in their Joomla templates but not all of them know the way to do it. JoomlaShine templates can help you to install the code easily. This article will show you how to do the Google Analytics integration with JoomlaShine templates. Just follow the instructions; you can do it in a few minutes.
With the default Joomla, you must edit the template's HTML to add Google Analytics code. It's not easy for you to do it successfully if you are a Joomla newbie and know nothing about the HTML code. Most of you must try it at least twice to make the code work. But JoomlaShine templates have a special feature that allows you to install the code without editing the HTML file. And the code will work correctly as soon as you have added it. Have a look at the Analytics feature, and I will guide you step by step to use it with the instructions below.
Step 1: You must have a Google mail account. If you don't already have one, sign up for free.
Step 2: Visit Google Analytics website, click the "Sign up now". You will be redirected to a new page to login with your Gmail account.
Click "Sign up now" to create an accountStep 3: After you have logged in, you will see the table to ask you sign up again. Click it; it's just a Spam filter of this website.
The second page ask you to click "Sign up" againStep 4: Now you can see a new page with general fill-in form. Just enter your account name, the URL you wish to track (without /index.php or similar), your country and time zone. With this account, you can also control your data sharing with other Google products such as Adwords, Google webmaster, etc. Remember to tick "Yes, I agree to the above terms and conditions" before you click "Create Account" at the bottom.
Fill general information about the site you want to track
Step 5: So you have finished creating an account. And you can see the tracking code configuration with the information and the code to add to your website.
Your Google Analytics code
There's a notice under the code tab about the new and old tracking code snippets. Maybe Joomla newbies will be confused about this and you will wonder what is the new one and the old one? What is the difference between them? I will explain the basics and the difference between these two codes.
Google analytics code has two script versions. The old one uses synchronous syntax and the new one uses asynchronous syntax. The code you see in the tab is the new one. The difference between them is the way the script file is loaded and the position to put the code. The Synchronous version uses two small script tags, before the closing tag. The Asynchronous version uses one script tag, at the end of the page's tag. The Asynchronous version is better. For more information you can read the Google code website at: Traditional Syntax and Asynchronous syntax
Two different code versions
Now I will copy the code and add it into JoomlaShine templates.
Step 1: Login to your Joomla administration, and go to "Template manager", choose a JoomlaShine template, here I use JSN Tendo PRO edition. Please note that you can do the same with JSN Epic PRO edition, JSN Dome PRO edition or JSN Teki PRO edition.
Joomla administration of JSN Tendo
Step 2: At SEO & System parameters, choose the suitable position for your code and paste it in the box. Then you click "Save"
Paste the code at Analytics code and choose code positionStep 3: Analytics code is added to your website now. If you view your website's source; you will see the code is installed in the right position. And on the Google Analytics website, you can start to view the reports.
The page's source with the Google Analytics script
So now, Joomla newbies, what do you think about Google Analytics integration with JoomlaShine templates? Is it really easy to do? Just try to install the code on your own website and tell me the result. Please feel free to ask me if you have trouble with the integration.