Installing an attendance counter for Joomla. Installing an attendance counter for Joomla Positioning informers in the area allotted to the module

From the author: I greet you dear readers. For each site owner, the attendance of his project is the highest priority issue, which means that after indexing, it is advisable to place a special counter on all pages that will record the exact number of visits to your site by users. Therefore, in this lesson, we will look at how to set a metric on Joomla.

A hit counter is a specific script that is designed to measure website traffic. That is, he counts the number of visitors who came to a particular site. Typically, a meter consists of two parts:

Data collection code that is added to common blocks for all pages of a specific site.

The logical part that counts the information received.

In fact, the logic and code of the counter can be quite simple and you can easily create it yourself, provided that you are familiar with the PHP programming language. But at this time, a huge number of different services have been created that provide ready-made website traffic counters for use. In this case, it is enough to register your own account and get the code to embed the counter on the site. We will talk about one of these services in this article, namely, how to install Yandex metrics on a Joomla site.

Yandex.Metrica is a completely free service designed to measure website traffic. To add it, you just need to add a special JavaScript code to a specific place on the website. In addition to simply counting the number of users, this service allows you to group site users by various parameters, measures the conversion of the site and online advertising, and also offers a mechanism for constructing reports for more convenient traffic analysis.

So, as mentioned above, Yandex metric on Joomla can be added by simply adding code that will be generated when creating a counter. So, we follow the link to the main page of the service.

I would like to draw your attention to the fact that to work with the counter, you need a Yandex search engine account. Next, you need to create a counter, for this we click on the "Add counter" button.

On the next page, we indicate the name of the future counter, the domain of the site on which it will be used, the time zone and time of inactivity of the user, after which it is considered that he left the site. After that, to save the counter, click on the "Create counter" button.

Modern trends and approaches in web development

Learn the fast growth algorithm from scratch in site building

To get the Metrica insert code, go to the “Counter Code” tab.

In this case, activate the "Asynchronous input" parameter by ticking, so the data about visitors will be sent to the server without reloading the page, that is, asynchronously. And also, if it is necessary to display the results of calculations on the site in the form of a special informer, activate the “Informer” parameter. Then, in the text area below, the service provides a code that activates the counter on your site. The appearance of the informer can be changed using the "Customize" button.

Having finished with the settings, we copy the counter code for subsequent insertion into the site template code. Please note that the Metrica code, as a rule, must be available on absolutely all pages of the site, which means it must be added to the general block for all pages. A footer can serve as such a block.

Now let's go directly to the question - how to add Yandex metrics to the joomla site. So, go to the directory of the active template, in my case it is beez3, and open the index.php file in a text editor.

This file is the main template file, which defines its structure and plug-in positions. This means that at the very bottom of the file code, footer blocks are formed - where we will add the copied code of the newly created counter.

To better manage the site and detect possible problems or inconveniences of use, it is recommended to install traffic counters. In addition to the simplest statistics of visits and visits to certain pages, some of them can provide additional information that allows you to analyze user behavior, display transitions, etc. Similar tools are provided by Yandex.Metrica and Google Analytics services.

There are opinions that the installation of counters from the aforementioned companies can reduce traffic to the site or slow down its work. This is only partly true.

A few words in defense of these tools.

The counters have the smallest impact on page loading. load scripts, the weight of which does not exceed 200 bytes. Even with a low Internet speed, users will not feel delays, and if you place the code at the very end of the html page, then they will be loaded after the main content is loaded, when the visitor can already work with the information.

As for the decrease in traffic, this applies only to low-quality sites that visitors quickly leave (have a high bounce rate). If after installing the script of any counter on the site you feel a decrease in traffic, then do not rush to delete it. Better understand the reasons for the situation. Most likely, there are some problems, the elimination of which will increase the quality of the resource.

Installation methods

There are several ways to place a script on a site powered by CMS Joomla. The methods work both for version 2.5 and for versions of the 3.x series.

  • Script output using standard Joomla HTML module. The disadvantage of this method is the need to turn off filtering for the visual editor plugin every time you need to edit the module, which is unsafe.
  • Inserting counter code into the main template file. The disadvantage of this method is that when using 2 templates for a site or moving from one to another, you will have to manually edit the main template file. Also, it will not work to temporarily disable the script, if the need arises (to remove from publication).
  • Application of a specially created module.

The first two options given, due to the mentioned shortcomings, will not be considered.

Module creation

The module consists of three files:

  • index.html - empty file to hide the file structure of the module folder;
  • mod_YandexMetrika.xml - installation file;
  • mod_YandexMetrika.php is the main module file containing the counter code.

mod_YandexMetrika.php mod_YandexMetrika.xml index.html

Edit the content of mod_YandexMetrika.php after the corresponding comment:

You can download the module, but do not forget to change the main file by replacing the example code with your own. To do this, unzip the archive, change mod_YandexMetrika.php and zip the files again. The archive extension must be .zip.

Installation of attendance counters on the site Joomla 3

Lesson 8 will tell you how to install an attendance counter on your site, which is necessary in order to see the number of users who have visited your site. You can also see which pages users visited, where they came from to your site, how much time they spent there, etc. In general, the counter is a very useful thing for any site. And in this tutorial we will show you how to place it on sites managed by Joomla.

What is the counter for?

Attendance counter (visit counter) - a specialized service that allows you to measure the number of visits to a web resource. The counter consists of two components:

Counter code - installed on the pages of the site and allows you to collect data about visitors.

Counter engine - a script that allows you to process the information received and provides it in the form of a report, which is available to the owner of the meter, and sometimes to everyone.

Based on the definition of the counter, it becomes clear that in order to track the number of visits and the number of pages viewed, you need to install a counter code on your site that will allow you to control all visitors. It should also be borne in mind that modern counters provide the user with a large amount of information for analysis.

In this lesson, we will look at installing two counters on the site:

- Installing the counter on Joomla 3

- Joomla 3

Counter registration for site

Let's start by installing perhaps the most popular counter on the Russian Internet - the counter... This counter is very popular due to its ease of use and the large amount of data that can be obtained by simply placing the counter code on your website. So now let's take a closer look at the process of installing this counter on your site.

1) First you need to go to the site... It is available at - http://www.liveinternet.ru/


Here we are interested in the section "GET COUNTER"... Click on it and start the procedure for obtaining a counter.


Fields highlighted in green are required.

Address - enter the address of your site

Synonyms - if the site has several addresses (with www and without, etc.) specify them here

Title - Enter the name of your site

Email- enter your email address

Password - create a password for your attendance counter

Keywords - enter a few keywords that are related to your site

Statistics - you can make website traffic statistics publicly available, or so that access is carried out only when you enter a password

Subscribe - check the box if you want news to come to your mailbox

Language - specify the language of your site

3) After that, check if you have indicated everything correctly


If everything is correct, click REGISTER

4) After that, the following window will appear in front of you


And a letter will be sent to the email address with a notification about the registration of the site. Now we need to get the code of the counter itself and place it on our website. We press GETCOUNTER HTML CODE

5) After that, you need to select the appearance of the counter.

You can also select the required parameters for the counter.


We recommend placing the counter with one picture. If you need some more additions, then check the boxes to pull out the code, keep track of headers, etc. If you do not need this or you do not understand what is at stake, then just leave this data blank.

6) That's all. After all the actions, we get the counter code, which must be installed on your website.


Also, do not forget that you should not make changes to this code, as this may affect its performance and lead to incorrect calculation of statistics.

Installing the counter on Joomla 3

After you have received the counter code from the serviceto your site, you will need to place it on all pages of your resource. Novice Joomla users may have some problems at this stage, so we will tell you how to make this installation.

1) First, we need to decide where the counter will be installed on your site. Basically, counters are placed in the footer of the site (bottom), but you can place it wherever you want.

All templates on Joomla are divided into several positions (blocks).

The figure shows the approximate location of the modules in the template for sites on Joomla. You can remove some positions or create new ones. The site counter is usually placed at the bottom (positions 8-11). We select any of the indicated positions and put the code for our counter there.

2) In order to find out what blocks your site consists of, you need to register the following in the address bar:

YOUR WEBSITE. ru /? tp = 1


After that, you will see the blocks that make up your site, as shown above.

If, after entering the request in the address bar, YOUR SITE.ru /? tp= 1, positions are not displayed, then you need to enable them in the site settings.

To do this, in the site control panel, go to the section

GENERAL SETTINGS - TEMPLATE MANAGER SETTINGS

And in the section VIEWING MODULE POSITIONS set to ON

3) Having figured out where on the site you will install the counter. You will need to create it in the module manager. To do this, go to the section:

EXTENSIONS - MODULE MANAGER and click CREATE

Select the MODULE TYPE - Html -THE CODE .


4) Now you need to configure the output of the new module with a counter.


We set the following parameters:

Title - Write any name for the counter

Show Title - Set to HIDE

Position - Select the position on your site where the counter will be placed.

Access - Install Public

The rest of the values ​​do not need to be changed.

5) Now click on the tab CUSTOM TEXT.


If you have an editor installed JCE (see Lesson 6), then just press the buttonTOOGLE EDITORand paste the counter code.

Registration of the Rambler-TOP100 counter for the site

Another very popular counter that is installed on most sites is Rambler-TOP100. Of course, you can get by with only one counter, but as an example, we will also tell you about installing Rambler-TOP100 on your site under the control of Joomla. First you need to register on the Rambler service. It is advisable to have a mailbox there, but you can also use the existing one. Let's analyze the registration of the counter step by step:

1) Go to http://www.rambler.ru/ and in the MORE section select the TOP 100 item


2) Here you will see a directory of sites that have already been added to this system. We are interested in the item FOR WEBSITE OWNERS

3) After that, if you have already been registered in this service, then log into your account. If you have not used Rambler-TOP100 before, then you will have to go through a short registration procedure.


4) After that, log into your account and go to the "MY SITES"

5) Here we are interested in the field

6) Now we need to complete 4 steps to add the site to the Rambler directory. At the first stage, you must specify the address of your site


7) At the second stage, you need to indicate:

Name of the site

Description of the site

Theme or Site Type

Keywords

8) At the 3rd stage, it is necessary to indicate the synonyms and exceptions of the main page of the site. For example, if the main page of the site is opened by the link site. ru and site. ru / index. php add this to the SYNONYMS section.


9) And at the last stage, you can customize the parameters of your counter by changing its appearance and setting some settings

10) After that you will receive your counter code and can install it on the site.

Installing the Rambler-TOP100 counter on Joomla 3

For installing the Rambler-TOP100 counter onJoomla3 use the same steps as for installing the counter from LifeInternet. You can also put two meters in one module.

Conclusion

In this lesson, we studied the registration of the site in the traffic counters and their installation on our site. To summarize, let's note that we learned:

How to register a counter

How to install a counter on Joomla 3

How to register a Rambler-TOP100 counter

How to install Rambler-TOP100 counter on Joomla 3

After your site has moved to hosting, you need to make the initial settings. Today we will analyze one of them, or rather, I will show you how to install a liveinternet traffic counter on a joomla 3 website.

If someone has a question: why exactly the counterliveinternet? By installing this counter, you will receive not only the number of visitors to your site, but also very detailed statistics that will help in promoting your project. I also want to note that this is the most popular counter in runet. Personally, I am very pleased with it :), I advise everyone!

In order to get the counter code go to the website liveinternet.ru and in the upper left corner, click on the link "Get the counter".

A form with registration will open in front of you, in green, required fields are indicated. Enter your details, as shown in my screenshot and click "next".

On this page, check the correctness of filling in the fields and click "register".

We see the message "Your site has been successfully registered", a letter will be sent to your specified mailbox with a message about successful registration in the service, which will contain a username and password.

Now, we need to choose the appearance of the counter. I will indicate the usual logo by clicking on the counter you like and select its color.

At the bottom of the page, select "as one picture".

This completes the settings, it remains to click on the button "get html-code of the counter"