How Do I Install Google Analytics in Joomla Without a Plugin?

Google Analytics is a must-have SEO tool for anyone who wants to grow their website. It allows you to track and analyze your page’s traffic and should be one of the first plugins to add to your Joomla website. 

But what if you don’t want to use a plugin? Can you do it manually? The answer is yes – it just requires a little more work.
In this article, we’ve put together a few step-by-step guides detailing installing Google Analytics in Joomlawithout a plugin. 

Get a Google Analytics Tracking Code

The first thing that you have to get is a Google Analytics tracking code. To get one, you need to create an account.

To obtain your tracking code, follow these steps.

  1. Head over to Google Analytics and log in with your Gmail account.
  1. After signing in, start the application by clicking the Sign Up button.
  1. Create your Google Analytics account (it’s a separate account from your 

Google account) by filling in your website information. Upon completion, click Get Tracking ID.

  1. Copy the tracking code and move to the next section.

Ways to Add a Tracking Code to Your Joomla Site

Now that you have your tracking code insert it as the first item in the <head> tag (more on that later). You need to do this for every page that you want to track. 

Depending on the template you’re using, there are a few ways to do this. 

Using Joomla Default/Protostar template

  1. Start by logging in to your Joomla website backend.
  1. In the control panel, go to ExtensionsTemplatesTemplates (Site), and select Protostar Details and Files.
  1. Lastly, find index.php, add your Google Analytics tracking code after the <Head> tag, and save it.

Using JoomlaShine Template 

  1. Log in to your Joomla website backend.
  1. In the control panel, go to ExtensionsTemplates, and select the JoomlaShine template.
  1. Once you’re in the template configuration, go to System, and paste your Google Analytics tracking code after the <Head> tag.

Gantry Framework – Custom Code

  1. Start by copying the Global Site Tag from Google Analytics.
  1. Next, you need to edit your template style by logging into the Joomla backend menu: ExtensionsTemplatesStyles, then select your template from the list.
  1. After that, go to the Page Settings tab.
  1. Lastly, click the Custom Content check box, paste the Global Site Tag code inside, and save the changes.

Installing a Template Without a Custom Code and Google Analytics Fields

  1. Copy the Global Site Tag from Google Analytics.
  1. Go to your template files through the Joomla backend menu: ExtensionsTemplatesTemplates, and choose your template from the list. 
  1. On the left, there is a list of directories. Click index.php.
  1. Find <head> in the code. 
  1. Create a new line by hitting Enter on your keyboard.
  1. Lastly, paste the Global Site Tag from Google Analytics on the new line, and press Save to save the changes.

Verify Your Setup

After installing the application, you need to ensure it’s working. There are a couple of ways to verify your setup.

First, by clicking on view-source:<your domain>, you can check the source code of your site. 

Alternatively, by using the Developer Tools in your browser, you can see whether or not the GA code is showing in the source.

Another way to check is by observing if Google Analytics is working is first by clicking on the Real-Time tab. Next, open another tab and visit your website. If you see your active users increasing, then it works.

Advanced Tips

Set Your Google Analytics Code Under the Opening <head> Tag

Whenever a user appears on your site, the JavaScript file must also load into their browser. The transcript will load much faster by placing your Google Analytics code just under the opening <head> tag. This enables the application to capture hit and bounce numbers with greater accuracy. So even if the network is slow or the visitor bounces quickly, you can still count the hit.

Exclude Your IP Address From Google Analytics

Since the website is yours, you’ll undoubtedly be visiting it frequently. This dilutes the accuracy of your tracking by inflating the number of visits. Therefore, you’ll need to exclude your IP (as well as any other IPs that aren’t visitors) from your tracking system. 

Here’s how to exclude your IP address from Google Analytics:

  1. Check your IP address by visiting ScalaHosting WhatsMyIP. Do this from all the locations you access your site and want to exclude until you have a list of IPs.
  1. Login to Google Analytics and select the profile of your site.
  1. Select Admin Menu, and click on All Filters.
  1. Enter the filter name (you can name it whatever you like).
  1. Set the filter type to PredefinedExcludeTraffic from the IP addressesThat Contain.
  1. Finally, enter your IP address in the box, and save. 

Create Google Analytics Dashboard in Your Joomla Admin

Staying organized goes a long way. By creating a Google Analytics Dashboard in your Joomla Admin panel, you can enjoy convenient access to the metrics of your website. 

To install the extension, follow these steps:

  1. First, download and install the Joomla Google Analytic Dashboard module extension.
  1. Then go to ExtensionModule → switch to Administrator module, and find the Google Analytics Dashboard module.
  1. You must fill in the Domain Name field, assign it to the Cpanel position, and hit the Save button.
  1. From there, click Authorize Application (it’ll appear as a box in your Joomla control panel).
  1. Click the Get Access Code button. You’ll likely need to log into your email account to grant access to your Google Analytics dashboard.
  1. Finally, paste the access code into the dashboard.

Why do you need this tool? 

As a business, you need to make your website accessible and user-friendly. While theoretical knowledge and best practices are an excellent place to start, observing how users interact with your website provides invaluable information. 

With more data, you have a clear picture of what needs fixing, and you can make the necessary adjustments that directly impact the issues and ultimately make better decisions for your business.

Google Analytics Impact on SEO

Google Analytics is an essential tool for SEO that enables you to track your website’s performance and collect visitor insights. 

By generating customizable reports, you can track and visualize data, including: 

  • Traffic
  • Bounce rates
  • Average session durations 
  • Sessions by channel 
  • Page views 
  • Goal completions 

These metrics are essential for your SEO endeavors. By monitoring the activity on your website, you have all the information that tells you what needs improving and what’s working well. 

Google Analytics is a powerful tool that can seriously beef up your website’s performance – which is why adding it to your Joomla site is so important

For further optimization, consider upgrading your web security, page optimization, and speed with the help of our team at Scala Hosting

FAQs

Q: How does Google Analytics help to grow your website?

A: The application monitors and processes the activity taking place on your website. Measuring the amount of traffic, average session durations, and bounce rates provide you with the information you need to fix certain sections or pages.

Q: How to add Google Analytics to Joomla?

A: You can add Google Analytics to Joomla using a plugin that a Joomla developer has designed. You can also use a Google Analytics support built-in to a template or framework. Lastly, you can tweak the template code manually if you know how to.

Q: Is Google Analytics free?

A: Google Analytics offers a free but limited version. It’s comprehensive and includes enough features to experiment. If you find that the free version doesn’t quite meet your needs, there is a premium monthly rate. The upgrade includes Google’s entire suite of features

Was this helpful?

What’s your goal today?

1. Find the right Joomla hosting solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lighting fast

We guarantee to make your WordPress site load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.

Photo

Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2023

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain

Rado
Author

Working in the web hosting industry for over 13 years, Rado has inevitably got some insight into the industry. A digital marketer by education, Rado is always putting himself in the client's shoes, trying to see what's best for THEM first. A man of the fine detail, you can often find him spending 10+ minutes wondering over a missing comma or slightly skewed design.