{"id":4968,"date":"2022-08-03T14:24:43","date_gmt":"2022-08-03T11:24:43","guid":{"rendered":"https:\/\/www.scalahosting.com\/kb\/?p=4968"},"modified":"2025-11-27T11:26:54","modified_gmt":"2025-11-27T09:26:54","slug":"how-do-i-install-google-analytics-in-joomla-without-a-plugin","status":"publish","type":"post","link":"https:\/\/www.scalahosting.com\/kb\/how-do-i-install-google-analytics-in-joomla-without-a-plugin\/","title":{"rendered":"Add Google Analytics to Joomla No Plugin"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google Analytics is a must-have SEO tool for anyone who wants to grow their website. It allows you to<strong> track and analyze your page&#8217;s traffic and should be one of the first plugins to add to your <\/strong><a href=\"https:\/\/www.scalahosting.com\/blog\/what-is-joomla-how-to-build-website-with-joomla\/\"><strong>Joomla website.&nbsp;<\/strong><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But what if you don\u2019t want to use a plugin? Can you do it manually? The answer is yes \u2013 it just requires a little more work.<br>In this article, we\u2019ve put together a few step-by-step guides detailing <strong>installing Google Analytics in Joomla<\/strong><em>without<\/em> a plugin.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Get-a-Google-Analytics-Tracking-Code\"><strong>Get a Google Analytics Tracking Code<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing that you have to get is a Google Analytics <em>tracking code<\/em>. To get one, you need to create an account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To obtain your tracking code, follow these steps.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Head over to <a href=\"https:\/\/analytics.google.com\">Google Analytics<\/a> and log in with your Gmail account.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>After signing in, start the application by clicking the <strong>Sign Up<\/strong> button.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Create your Google Analytics account (it\u2019s a separate account from your&nbsp;<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Google account) by filling in your website information. Upon completion, click <strong>Get Tracking ID<\/strong>.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Copy the tracking code and move to the next section.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Ways-to-Add-a-Tracking-Code\"><strong>Ways to Add a Tracking Code to Your Joomla Site<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you have your tracking code insert it as the <em>first<\/em> item in the <strong>&lt;head&gt;<\/strong> tag (more on that later). You need to do this for every page that you want to track.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the template you\u2019re using, there are a few ways to do this.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Using Joomla Default\/Protostar template<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start by logging in to your Joomla website backend.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>In the control panel, go to <strong>Extensions<\/strong> \u2192 <strong>Templates<\/strong> \u2192 <strong>Templates (Site)<\/strong>, and select <strong>Protostar Details and Files<\/strong>.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Lastly, find <strong>index.php<\/strong>, add your Google Analytics tracking code after the &lt;Head&gt; tag, and save it.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Using JoomlaShine Template&nbsp;<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your Joomla website backend.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>In the control panel, go to <strong>Extensions<\/strong> \u2192 <strong>Templates<\/strong>, and select the <strong>JoomlaShine<\/strong> template.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Once you\u2019re in the template configuration, go to <strong>System<\/strong>, and paste your Google Analytics tracking code after the &lt;Head&gt; tag.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Gantry Framework \u2013 Custom Code<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start by copying the Global Site Tag from Google Analytics.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Next, you need to edit your template style by logging into the Joomla backend menu: <strong>Extensions<\/strong> \u2192 <strong>Templates<\/strong> \u2192 <strong>Styles,<\/strong> then select your template from the list.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>After that, go to the <strong>Page Settings<\/strong> tab.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Lastly, click the <strong>Custom Content<\/strong> check box, paste the Global Site Tag code inside, and save the changes.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Installing a Template Without a Custom Code and Google Analytics Fields<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Copy the Global Site Tag from Google Analytics.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Go to your template files through the Joomla backend menu: <strong>Extensions<\/strong> \u2192 <strong>Templates<\/strong> \u2192 <strong>Templates,<\/strong> and choose your template from the list.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>On the left, there is a list of directories. Click <strong>index.php<\/strong>.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Find <strong>&lt;head&gt;<\/strong> in the code.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Create a new line by hitting <strong>Enter<\/strong> on your keyboard.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Lastly, paste the <strong>Global Site Tag<\/strong> from Google Analytics on the new line, and press <strong>Save<\/strong> to save the changes.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Verify-Your-Setup\"><strong>Verify Your Setup<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After installing the application, you need to ensure it\u2019s working. There are a couple of ways to verify your setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, by clicking on <strong>view-source:&lt;your domain&gt;,<\/strong> you can check the source code of your site.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, by using the <strong>Developer Tools<\/strong> in your browser, you can see whether or not the GA code is showing in the source.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another way to check is by observing if Google Analytics is working is first by clicking on the <strong>Real-Time tab<\/strong>. Next, open another tab and visit your website. If you see your active users increasing, then it works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Advanced-Tips\"><strong>Advanced Tips<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Set Your Google Analytics Code Under the Opening &lt;head&gt; Tag<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Whenever a user appears on your site,<strong> the JavaScript file must also load into their browser<\/strong>. The transcript will load much faster by placing your Google Analytics code just under the opening <strong>&lt;head&gt;<\/strong> 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Exclude Your IP Address From Google Analytics<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Since the website is yours, you\u2019ll undoubtedly be visiting it frequently. This dilutes the accuracy of your tracking by inflating the number of visits. Therefore, you\u2019ll need to <strong>exclude your IP<\/strong> <em>(as well as any other IPs that aren\u2019t visitors)<\/em> from your tracking system.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Here\u2019s how to exclude your IP address from Google Analytics:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Check your <strong>IP address<\/strong> by visiting <a href=\"https:\/\/www.scalahosting.com\/ip.php\">ScalaHosting WhatsMyIP<\/a>. Do this from all the locations you access your site and want to exclude until you have a list of IPs.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Login to Google Analytics and select the profile of your site.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Select <strong>Admin Menu<\/strong>, and click on <strong>All Filters<\/strong>.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Enter the filter name (you can name it whatever you like).<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Set the filter type to <strong>Predefined<\/strong> \u2192 <strong>Exclude<\/strong> \u2192 <strong>Traffic from the IP addresses<\/strong> \u2192 <strong>That Contain<\/strong>.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Finally, enter your <strong>IP address <\/strong>in the box, and save.&nbsp;<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Create-Google-Analytics-Dashboard\"><strong>Create Google Analytics Dashboard in Your Joomla Admin<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Staying organized goes a long way. By creating a <strong>Google Analytics Dashboard in your Joomla Admin panel<\/strong>, you can enjoy convenient access to the metrics of your website.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install the extension, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First, download and install the <a href=\"https:\/\/extensions.joomla.org\/extension\/google-analytics-dashboard\/\">Joomla Google Analytic Dashboard<\/a> module extension.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Then go to <strong>Extension<\/strong> \u2192 <strong>Module<\/strong> \u2192 switch to<strong> Administrator <\/strong>module, and find the <strong>Google Analytics Dashboard<\/strong> module.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>You must fill in the <strong>Domain Name<\/strong> field, assign it to the <strong>Cpanel<\/strong> position, and hit the <strong>Save<\/strong> button.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>From there, click <strong>Authorize Application<\/strong> (it\u2019ll appear as a box in your Joomla control panel).<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Click the <strong>Get Access Code <\/strong>button. You\u2019ll likely need to log into your email account to grant access to your Google Analytics dashboard.<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Finally, paste the access code into the dashboard.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Why-do-you-need-this-tool\"><strong>Why do you need this tool?&nbsp;<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As a business, <strong>you need to make your website accessible and user-friendly<\/strong>. While theoretical knowledge and best practices are an excellent place to start, observing how users interact with your website provides invaluable information.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Google-Analytics-Impact-on-SEO\"><strong>Google Analytics Impact on SEO<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Google Analytics is an essential tool for SEO <\/strong>that enables you to track your website\u2019s performance and collect visitor insights.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By generating customizable reports, you can track and visualize data, including:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Traffic<\/li>\n\n\n\n<li>Bounce rates<\/li>\n\n\n\n<li>Average session durations&nbsp;<\/li>\n\n\n\n<li>Sessions by channel&nbsp;<\/li>\n\n\n\n<li>Page views&nbsp;<\/li>\n\n\n\n<li>Goal completions&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These metrics are<strong> essential for your SEO endeavors<\/strong>. By monitoring the activity on your website, you have all the information that tells you what needs improving and what\u2019s working well.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Google Analytics is a powerful tool that can seriously beef up your<strong> <\/strong><a href=\"https:\/\/www.scalahosting.com\/blog\/5-tips-to-make-your-website-faster\/\"><strong>website&#8217;s performance<\/strong><\/a> \u2013 which is why adding it to your <strong>Joomla site is so important<\/strong>.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For further optimization, consider upgrading your <strong>web security, page optimization, and speed <\/strong>with the help of our team at <a href=\"https:\/\/www.scalahosting.com\/about-us.html#awards\">Scala Hosting<\/a>.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"FAQs\"><strong>FAQs<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How does Google Analytics help to grow your website?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A: The application monitors<\/strong> 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: How to add Google Analytics to Joomla?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A: <\/strong>You can add Google Analytics to Joomla using a plugin that a Joomla developer has designed. You can also <strong>use a Google Analytics support built-in to a template or framework.<\/strong> Lastly, you can tweak the template code manually if you know how to.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Q: Is Google Analytics free?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A: <\/strong>Google Analytics offers <strong>a free but limited version<\/strong>. It\u2019s comprehensive and includes enough features to experiment. If you find that the free version doesn\u2019t quite meet your needs, there is a premium monthly rate. The upgrade includes <strong>Google\u2019s entire suite of features<\/strong>.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s traffic and should be one of the first plugins to add to your Joomla website.&nbsp; But what if you don\u2019t want to use a plugin? Can you do it manually? The [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_titles_title":"Add Google Analytics to Joomla No Plugin | ScalaHosting KB","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"none","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"both","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"footnotes":""},"categories":[69],"tags":[],"class_list":["post-4968","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-joomla-hosting"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/4968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/comments?post=4968"}],"version-history":[{"count":10,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/4968\/revisions"}],"predecessor-version":[{"id":5820,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/4968\/revisions\/5820"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/media\/5391"}],"wp:attachment":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/media?parent=4968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/categories?post=4968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/tags?post=4968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}