How To Install Google Analytics In Joomla - Step-by-Step Guide
You have to admit:
Despite using a ton of advanced search optimization techniques, or configure your Joomla SEO setting to the fullest, it will be worth next to nothing if you don’t have anything to monitor and track the results afterwards.
Therefore, you need an online tracking tool, and I promise you there are no tools that are both free to use and powerful as Google Analytics. Despite whatever CMS you use, even if it isn’t Joomla, Google Analytics must be the first tracking tool to integrate into your site.
In this article, I will show you every possible and effective way you can install Google Analytics on Joomla and see how it improve traffic for your site.
Table of contents
- Get Analytics tracking code
- 3 best ways to add tracking code into your Joomla site
- Verify your set up
- Advanced tip
- Create Google Analytics Dashboard in your Joomla Admin
- Why do you need this tool? What impact will it have on your SEO efforts?
Get Google Analytics tracking code
Despite which method you use for adding Google Analytics (GA) in your Joomla site, first you must have GA account and its tracking code.
Follow these steps to get the tracking code for your website.
Step 1: Go to analytics.google.com, login with your Google account
Step 2: Click “Sign Up” to start using Google Analytic.
Step 3: Fill all your website information, then click “Get tracking ID” at the end.
Step 4: Copy the tracking code, then move to the next section.
3 best ways to add Google Analytics tracking code into your Joomla site
After getting the tracking code, as per Google instructions, you need to insert the code as the first item into the <HEAD> of every webpage you want to track.
In order to do that in Joomla, you can choose one of the 3 methods below.
- Using Joomla default template
- Using JoomlaShine template features
- Using extension
Note: If you happen to read anywhere that you can embed the tracking code before </head> or after <body> tag, I can tell you using that way still make it work. However there is an issue with these methods is that if a user exits your site before the tracking code can load, Google Analytic can not record this session. A 1-second session could indicate there is some problem with your website (high bounce rate, low loading speed, etc), and you can fix it in time.
So, embed it as the first item before <head> tag ensure you can keep track of every session.
Using the default template
For this example, I will demonstrate to you using Protostar template. (Breeze 3 is the same)
Step 1: Log in to your Joomla site backend.
Step 2: In the control panel, go to Extensions/Templates/Templates (Site), then chose Protostar Details and Files.
Step 3: Find index.php, and add your GA tracking code right after the <head> tag. Then save it.
You have now successfully added your tracking code into your Joomla site.
Using the JoomlaShine template
Different templates will have a slightly different way to add Analytics Code. However, the steps and rule are always the same.
Many Joomla template provider like JoomlaShine has a built-in function to help you add the tracking code effortlessly, and it’s much easier than using the Joomla default template. You don’t need to tweak any Joomla core code.
If you happen to use a JoomlaShine template, here is how you do it.
Step 1: Login to your Joomla site backend
Step 2: In the control panel, go to Extensions/Templates, then choose your JoomlaShine template.
Step 3: In the template configuration, go to System, and add your GA tracking code in the After <Head> section.
You have now successfully added your GA code to your Joomla site using the JoomlaShine template.
Make your SEO efforts easier with JoomlaShine templates - the beautifully hand-crafted, perfectly responsive and SEO friendly templates.
TRY SEO-FRIENDLY JOOMLA TEMPLATE FOR FREE
Using Joomla plugin - extension
If you search on JED, there are many useful extensions - plugins that will help you add your Google Analytics (GA) code easily. However, to save you time, I will present the 2 most convenient and easy-to-use extensions.
Asynchronous Google Analytics
It comes with both a free and paid version. However, for adding GA code, you only need the free version. Please follow these steps to use this plugin.
Step 1: Download the plugin, and install it in your Joomla site.
Step 2: Go to Extensions/ Plugins, search for: System - Google Analytic.
Step 3: In the Options tab, fill in your GA tracking ID.
Note: you can find the tracking ID when getting GA tracking code.
Step 4: Enable the Plugin.
DC Joomla Google Analytics Plugin
Developed by Collective Ray. This plugin is also totally free and very easy to use. If you like it, you can donate a beer for its creators. Please follow this guide to use the plugin.
Step 1: Download the plugin, and install it in your Joomla site
Step 2: Go to Extensions/ Plugins, search for: System - DC Google Analytics.
Step 3: In the Plugin, fill in your GA tracking ID in Google Analytic Code field.
Note: you can find the tracking ID when getting GA tracking code.
Step 4: Enable the Plugin.
Verify your tracking code set up
To see if it works or not, you can check in the active user visitor in your control panel. In the meantime, also open your website in another browser tab. If you see your real-time visitors increasing, then it works.
Advanced tips for setting up Google Analytics
After successfully adding tracking code on your website, there is a few quick and easy setup you can do in 5 minutes that improve your Analytics setup.
Exclude your IP address from Google Analytics
You will visit your website a lot. That’s for sure.
And all of those visits will infer your data, make the metric is not accurate anymore and it’s very dangerous since your action will be based on its data.
Therefore it’s best for you to exclude those in meaningful traffic. Here is how you do it.
Step 1: Check your IP address with whatsmyip.org. Do this with all the place and Wi-Fi network you want to exclude.
Step 2: Login to Google Analytics, and select your profile.
Step 3: Select Admin menu, then click All filter.
Step 4: In the panel just show up, configure the setting as follows:
- Fitler name: anything*
- Filter type: Predfiend
- Exclude
- Traffic from the IP addresses
- That Contain
- IP address: the IP you check in step 1.
Save it, and you have successfully excluded the IP address from Google Analytics.
Compile GDPR with Google Analytics
If you don't know, GDPR is an essential rule about asking consent for data storage, usage for all individuals residing in the EEA ( European Economic Area). The rule has been implemented widely. And like any other Analytics tools, Google Analytics also have to compile this rule.
In Joomla, there are some extension will have you go through the nightmare of GDPR easily such as:
- System - Google Analytics (No Cookies): commercial extension with many advanced setups to follow the rules carefully
- DD Google Analytics (EU Privacy): free and paid version, that comes with setting up IP anonymization mode, and provide an opt-in, opt-out function for your site.
However, this topic is complicated to understand with a few simple texts. I suggest if you want to compile 100%, you should refer to this article.
Create Google Analytics Dashboard in your Joomla Admin
If you want to keep track of everything on your Joomla admin panel or simply want a convenient view on your site metric within the dashboard like the picture below, you can install the module extension call: Joomla Google Analytics Dashboard.
Like many other Analytic extensions in Joomla, it’s simple to install and configure. Here is how you do it.
Step 1: Download and install Joomla Google Analytic Dashboard module extension.
Step 2: After installing, go to Extension/ Module, switch to Administrator module, and find “Google Analytics Dashboard” module.
Step 3: Fill in the Domain name field, assign to Cpanel position. Then save it.
Step 4: Click Authorize Application, it will popup a box in your Joomla control panel.
Step 5: Click the Get access code.
Note: you may have to sign in with your email account, and allow it to access to your Google Analytics dashboard.
Step 6: After that, you will have an access code like this, paste it to the dashboard.
Now can see all the data within your Joomla Admin control panel.
If you still confused about how to set up this extension on your site, maybe this video below can help you.
Why do you need Google Analytics? What impact will it have on your SEO efforts?
“Knowing others is intelligence, knowing yourself is true wisdom” - Lao Tzu.
Despite the fact that this tool can not solve the first part of this famous quote, it definitely helps you “know yourself” to the core.
Here are a few important metrics you can easily learn with Google Analytics:
- Traffic
- Revenue
- Your source of traffic
- Time on page
- And countless more useful metrics
All of them are critical factors in your SEO efforts. Therefore, if you can monitor and track these metrics daily, you will learn which factor you need to improve, and which are working well. From there, your SEO plan can begin to have a significant impact on your Joomla site.
You get the idea.
If you still need to learn more about this powerful tracking tool, you can start learning with Google Analytics Academy.
In Summary,
Measuring and tracking is an essential step when you doing SEO, and Google Analytics is a perfect mean for you to oversee your website data. Let’s review of how you can install Google Analytics in your Joomla site:
- Signup for Google Analytics Account
- Get tracking code
- Add the code on your Joomla site using:
- The default template (Protostar)
- 3rd-party template special function (JoomlaShine)
- Plugin and extension
- Verify the code
Download JSN Templates for free
Hopefully, this article will help you add Google Analytics tracking code to your Joomla site successfully.
Learn more about SEO: