Home
/
Website Help
/
Other
/
How to configure Google Analytics for your website?

How to configure Google Analytics for your website?

One of the many great services provided for free by Google is the well-known traffic monitoring feature called Google Analytics. It is a tool that provides a wide range of information regarding your visitors’ physical location, referring websites, unique visitors’ number and content popularity.

Maybe one of the most significant advantage of Google Analytics compared to other software on the market is the powerful graphical interface. This provides you as a webmaster not only with raw numerical data but also with detailed graphics and the option to compare different time periods on metrical schemes.

Along with the fancy interface, a lot of useful tools are provided for traffic optimization. For example, a world map with the exact location of your visitors is available which is an important feature for any webmaster whose websites is local-market oriented. Additionally, the Traffic Sources feature allows you to closely monitor the number of visitors any website refers to you. This can be of great importance if, for example, you are in the middle of a paid Internet/Banner-based advertisement campaign because you will be able to determine which website is worth continuing your banner advertisement with.

Even with all those great features and complex data mining, Google Analytics is one of the most user-friendly tools. In order to get started, you will need to sign up at the official website.

As soon as you log in to your Google Analytics area you need to add your website and generate a tracking code which will be placed on your website later. To add your website, click Add Website Profile. From the new page, you should type your website address and select your Time Zone.

Selecting the correct time zone is important in order to have comprehensive data generated depending on your physical location. When you are ready, click on Finish and you will be provided with a code such as:

<script><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js <http://google-analytics.com/ga.js>' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
pageTracker._trackPageview();
</script>

Be advised that the number which is provided for you on the following line:

var pageTracker = _gat._getTracker("UA-xxxxxx-x");

is unique for your website and account.

This code should be inserted in every page for which you would like Google Analytics to generate statistics. Basically, if you use an open-source application such as WordPress there are already created components/modules that can be installed. Such components will save you a lot of time copying/pasting the code on every single page. Instead, you can add the unique number from the code in the module/component menu and it will be automatically inserted on every page of your website.

Let`s say, however, that you have a PHP or HTML website created with DreamWeaver. Obviously, there is no module or component that can insert the code for you, thus you should do it yourself. Generally, you will need to copy and paste the code segment at the bottom of your page code, right before the tag of each page you are planning to track. Still, if you use a common include file or a template, you can insert the code there. Be advised that the code is not visualized in any way. Thus, you do not need to worry about its exact location.

While Google Analytics provides powerful insights on its own, for more customized GA4 reporting capabilities, considering a dedicated GA4 reporting tool can significantly enhance your data analysis and decision-making process. These tools are designed to help you create bespoke reports tailored to your specific KPIs, combining Google Analytics 4 data with other sources for a comprehensive overview.

On the other hand, if you are using any open-source application you may search on the official website for a suitable module/component that can help you insert the code. Below is a list of some of the most commonly used applications for which you can find such components or instructions on how to add your code:

  • WordPress:

GA Google Analytics

Google Analytics for WordPress

Note: Depending on your WordPress theme, one of the plugins may not work properly; thus we recommend trying both of them and then checking which one is properly detected by the Google Analytics tool.

Share This Article