Basic and additional settings of the counter. Asynchronous counter code

It is important for every blogger to know the intensity with which site traffic is growing. In addition, it is useful to carry out detailed analysis, who comes to the site, where, from what queries the person found the blog, as well as other details about the visitor that will help in determining the portrait of the audience and adjusting the site.

You can find out about this by installing Yandex or Google counters or a counter for the LiveInternet site, which is beyond competition search engines, therefore gives more information on both PSs at once.

Liveinternet website visit counter

Each of the counters has its own pros and cons. I advise you to first try each of them and understand own experience something to use all the time.

How does the LiveInternet counter differ from others?

The fact is that by installing a counter from Yandex, you cannot receive detailed statistics according to search queries and transitions from Google, and Google itself will not provide you full of information about traffic through the Yandex search engine. The LiveInternet site visit counter gives detailed information about all visits to your site from all search engines. In addition, it is much easier to install than others.

Secondly, if you need to provide guest access to your statistics to another person, it will be much easier to do this in LiveInternet. You can also configure rights for each guest access— which statistics should be shown to this person and which not.

How to install a liveinternet counter on a website?

So, to get the LiveInternet counter, we first need to go to the following address: https://www.liveinternet.ru/add. You are taken to the registration page:

Here you need to fill in all the fields: Domain name your website, your email and password. The windows highlighted in color are required to be filled out. In this form you can choose whether the statistics will be public or password-only. If you wish, you can participate in ratings on the topic of your site. If you have any questions, click on the question mark next to each item.

Now we need to select the LiveInternet counter code. To do this, click " get the html code of the counter" A page with various graphic images counters that you can place on your website.

If you don't want visitors to highlight visit statistics, you can choose a sample that does not reflect the number of hosts and views. If you want the statistics to be visible to everyone, then choose any other option.

Having chosen the appropriate option, click on this counter and select the appropriate color to match your website design. Now, below on this page, mark the type of the counter itself. It is better to select one of these two options:

Go to next page. We see that the counter for the LiveInternet website is now ready; we’ll just copy and paste the code into the right place on your website.

How to add a liveinternet counter to a website

You can install LiveInternet on a website using a widget, or by inserting the code into the site footer. Let's consider both options. The easiest option is to paste the code into a text widget.

Let’s go to the site’s admin panel and select “ Appearance ", and then " Widgets" Now let's select the widget " Text"and drag it into your widget area. Paste the copied code into it.

Another way is to install it in the footer.php file. This option is better because by installing the counter in this way, it will be placed at the bottom of the site, and not in the sidebar.

So, in the administrative panel, select “ Appearance» -> « Editor" and on this page we find in the right column " Footer"(footer.php). Open the footer.php file:

Scroll it to the very bottom and insert our code before the closing tag, as shown in the picture:

After that, save the changes and look on the website to see what the LiveInternet counter shows.

You can also paste the counter code into the footer using . To do this, by connecting to your hosting via ftp, you need to open the file in your website template. Open the file in notepad or paste the code there and upload it to the hosting again.

How to hide the LiveInternet counter?

Many people don’t like it when the website design is clogged with counters and other nonsense. And if in the Yandex.Metrica settings you can make the counter invisible, then in LiveInternet this service is paid. But there are other ways to hide the LiveInternet counter:

I would like to draw your attention to the fact that you can hide the LiveInternet counter only from view ordinary users. Programs like RDS bar will still show your users your attendance, even if the statistics are closed from everyone. Therefore, if your blog already has a lot of traffic and you are afraid of envious people, it makes sense to completely abandon the use of LiveInternet.

Liveinternet site statistics counter

Now you can check the operation of the counter. To find out the statistics of site visits, you just need to click on the counter image. You will be immediately transferred to a website where statistics of visits to the LiveInternet website will be displayed.

Here you can find out the number of visitors, views and the time they spent on the site. Also pay attention to the left panel. By clicking on the line you are interested in, you will find out additional information (see below):

As you can see from these screenshots, thanks to the LiveInternet counter, you can obtain the most detailed information about your site visitors. For example, you can find out what time people visit your site most:

Now you know how to install a LiveInternet counter. With its help, you can analyze the effectiveness of your work with the site. Based on all this data, you will certainly make the site more convenient for visitors, which will affect the promotion and popularity of your resource.

I wish you good luck and bye!

If you have already created your website and it is open for indexing by search engines, then soon you will want to receive information about traffic statistics, traffic sources, etc. To do this, you will need to install a traffic counter on all pages of the resource. Let's try to figure out how and where to install such counters.

Yandex.Metrica Creation

To create a Yandex.Metrica counter, follow the link while logged in to your account and click the “Add counter” button:

Then you need to fill in the fields “Counter Name” and “Site Address”, select the time zone, accept the conditions user agreement and click “Create counter”:

After this, you will immediately be taken to the counter settings panel, where you can select certain parameters its work, for example, enable the web viewer, track the hash (for ajax sites) or install a widget:

As shown in the screenshot, the counter code with all its settings is presented in the field at the very bottom. Now all that remains is to copy the code and place it on the site.

Installation

It is best to install counters on all pages of a resource, so you need to place the code in a common template.

IN general view it will look something like this:

In this case, the informer does not have to be placed together with the main counter code; for example, it can be placed in the footer of the page, before the closing tag:

Google Analytics Creation

Creating a counter begins with registering a new one Google account Analytics. To do this, follow the link and click “Registration”.

Then click “Get Tracking ID” and accept the user agreement:

Immediately after this, you will be taken to a page with a new counter, the code of which must also be placed on all pages of the site.

ABOUT detailed settings Google counter Analytics can be read.

Installation

The installed counter looks something like this:

Installing counters in various CMS Bitrix

To install counters in Bitrix, you just need to open the general template and paste the code.

To do this, being on any page (provided that one template is used for all pages), you need to expand administrative panel(or in other words, Development Panel), select the “Site Template” tab, the “In Control Panel” subtab and click “Edit Template”:

Then insert the necessary counters according to the examples given above:

WordPress

There shouldn’t be any problems when installing counters on WordPress either.

Just select the “Appearance → Editor” tab in the administration panel, open the header.php file for editing (signed as “Header”) and insert counters:

OpenCart

There is a special field for adding a Google Analytics counter to OpenCart.

You need to go to the “System → Settings” section, select the “Change” action opposite your store, then select the “Server” tab:

At the bottom of the page, paste the counter code into the “Google Analytics Code” field and save:

The installation of the Yandex.Metrica counter and any others can be done in a general template, according to the examples given above. To do this, you will have to connect to the site via FTP and find the template files. Typically, the path is something like this: /catalog/view/theme/your_theme/template/common files footer.tpl or header.tpl

Joomla

As with all the systems described above, counters are placed directly in the template files. But if you use FTP access If it’s not very convenient, or you’re afraid of doing something wrong, you can place counters directly in the admin panel.

To do this, you will need to create an HTML module (tab “Extensions → Module Manager”, click “Create” and select “HTML code”) and configure it.

So, let's create a new module:

  • Let's give it a name
  • Insert the counter code
  • Hiding the header display
  • Choosing a position
  • Link to all pages
  • We rejoice!
  • If you are using a framework, then most likely it already provides the ability to place counters on all pages (you will have to look carefully in the settings).

    Other counters

    All other counters, for example Mail.Ru Rating, LiveInternet, etc., are recommended to be inserted before the closing tag. First of all, this is necessary so that the code does not interfere with the page loading. If you still want to place the code somewhere else, then you can use asynchronous loading("async" attribute for the tag). This will allow the counter to load simultaneously with the html page.

    If you have problems creating, configuring or installing meters, you can order these services.

    We released new book"Content marketing in in social networks: How to get into your subscribers’ heads and make them fall in love with your brand.”

    Subscribe

    What is asynchronous counter code?

    Asynchronous tracking code (counter) is a script code inserted into the body of the site, designed to track traffic statistics. These include Google scripts Analytics and Yandex.Metrics.

    This code is called asynchronous because it runs in parallel with all other scripts. What does it mean?

    By default, all JavaScript is executed sequentially, and if there is an error in the first code or an element that delays the loading of other scripts, then an error may creep into the tracking of visit statistics. Asynchronous code is executed in parallel with other processes and is the very first one when the page is loaded. This ensures its 100% response and accurate data collection.

    The data sent by this script forms statistical objects. These include:

    • page view;
    • external transition;
    • user.

    This data is needed in order to form an overall picture of the site: the number of visitors, their gender and age, geography and time spent on the site, entry and exit pages, etc.

    Where to get Google code Analytics and Yandex.Metrics?

    To get the Google Analytics code you need:

  • Register or sign in to Google services.
  • Go to the “Administrators” tab, fill in the fields “Account Name”, “Site Name”, “Site URL”. It is recommended to create a new account for each new site.
  • 3. Accept the terms of use.

  • After this, the identifiers and code will become available to you Google tracking Analytics.
  • To receive asynchronous code in Yandex. Metrica:

  • Register or log in to the service.
  • Click the "Add Counter" button.
  • A new counter window will open. Fill out the fields and check the “I accept the terms” checkbox.
  • Your site counter will be assigned a number. In the “Counter Code” section you will find a code that you can insert into the site.
  • Where to put the Google Analytics and Yandex.Metrica code?

    The new tracking code is placed at the very beginning of the page - in the block. Basically, this is done through an editor or FTP.

    But, if you, for example, are the owner of a website on WordPress, then special plugins with the code “Google Analytics” are available for you for WordPress» or Google Analyticator. You simply paste your Tracking ID into the Analytics Profile field, and the system performs the authorization itself.

    Owners of CMS OpenCart can insert the Google Analytics code by selecting the Extensions -> Analytics tabs and pasting the counter code into the corresponding Google Analytics field.

    Also, owners of dynamic.php sites can independently insert the code into the header file. php, but this threatens that the code will disappear when the system is updated, and it will have to be posted again. Or create an analyticstracking. php and add it to all templates PHP pages with a line of code immediately after the opening tag.

    Site visit counters

    The site owner wants to know exact numbers: how many people visited the site yesterday, where did they come from specifically, how many pages were viewed on average, which pages are the most popular? Special counters will help you track website traffic and track the degree of progress.

    Content
    • § 1. Visit counters
    § 1. Visit counters

    A counter is an Internet service that measures website traffic. The program usually consists of two main parts: program code, placed on the pages of the site to collect information and code that processes and calculates the information received from the site, provides information about site traffic.

    It is impossible to accurately predict the audience's reaction. The results may be unexpected. It is necessary to constantly monitor the flow of visitors and analyze the effectiveness of actions.
    The visit counter is the most convenient tool for this. It allows you to track not only the number of visitors to the site, but also a lot of other information about visitors.

    What can the meter show?
    1. Who (host name, browser, system, Referer (Address from which the visitor came to the site))
    2. From where (from which search engine, rating, links)
    3. When
    4. How much time spent on the site
    5. How many pages viewed (Hits)
    6. Where did you go?
    7. How many visitors in total?
    8. How many unique visitors
    9. Statistics by day - the counter can provide graphic display results and the ability to transfer statistics by E-mail.

    Recommendations:

    No. 1. You should not install a simple counter to track the number of visitors per day on your resource.

    No. 2. Only multifunctional meters need to be installed. If your site or blog is still quite young, then you probably shouldn’t open the statistics for public viewing. If you have already proven to yourself and everyone else that you are a “pro,” then open statistics will only play into your hands, increasing confidence in you and your project.

    § 2. Installation of the meter on the site

    Installing a counter on your website is very simple. To do this, we need to select a statistics service and install the counter code for this service on our website. To have such information, we need to register our site in the Webmaster Panel in Yandex and Google or in liveinternet.

    2.1. Install a hit counter on liveinternet

    Thanks to the liveinternet counter, you can see the number of visitors to your site (per day, weeks, months), what sites people come from, what search engines, for what queries, how much time they spend on your site, how many pages they view per visit and where they go, browsers , OS and screen resolution of visitors, etc.


    To install the counter, follow the link http://www.liveinternet.ru/add

    Fill in the required fields. Required fields marked in green. And click “Next”

    In the next window, we accept congratulations on the successful registration of the site. And click “Get HTML code of the counter”

    A page appears with the counter code that we need to copy


    and click save.

    2.2. Install a visit counter on Yandex Metrica

    You can also get from Yandex great amount analytical data on website traffic. What makes this counter stand out is the ability to view a map of clicks on a page and the Webvisor service, which allows you to make video recordings and analyze the actions of site visitors

    To install the counter, follow the link http://metrika.yandex.ru/ If you have an account on Yandex, then enter your login and password, if not, then register. Click “Add counter”


    Fill in the required fields. Click “Continue”


    Select the desired counter design, copy the counter code and click the “Save” button


    Now we need to insert the counter code into our website. To do this, go to the admin panel, select “Appearance”, then “Editor”, look for Footer.php on the right and click on it. Then we paste the code of our counter before the tag and click save.

    2.3. Install a visit counter on Google Analytics

    Google Analytics (abbreviated GA) — free service, provided by Google to create detailed statistics about website visitors. Statistics are collected on Google server, the user only places the JS code on the pages of his site. The tracking code is triggered when the user opens the page in their web browser.


    To do this, follow the link http://www.google.com/analytics/ If you have a Google account, then enter your username and password, if not, then register. Click “Registration”


    Fill in the required fields. Click “Get Tracking ID”.



    Paste the counter code into the website.

    To do this, go to the admin panel, select “Appearance”, then “Editor”, look for Footer.php on the right and click on it. Then we paste the code of our counter before the tag and click save. Thanks to statistics Google visits

  • Analytics can be found:
  • 1.Number of visits;
  • 2.Number of unique visitors;
  • 3.Number of pages viewed;
  • 4.Average number of pages per visit;
  • 5.Average duration of visit; In order to have open statistics for the entire site, a visit counter is installed on the site. In this case, each visitor to your site sees the number of visits recorded per day, per month, for the entire existence of the site. In addition, visit counters provide us with all other statistics on the site upon request. Functionality modern meters

    literally limitless.

    That's all! Nothing complicated.

    I wish you success in all your endeavors.

    Visitor counters can be found on almost any website, and if they are not visible visually, this does not mean that they do not exist. A real webmaster and optimizer must know how many people visit his resource, what queries they follow, etc. Some even put counters in a prominent place to show off to other users (webmasters). From this article you will learn how to add a visit counter to your website, as well as how to select a counter.

    1. Who needs a counter on the site and why?

    An ordinary user who is far from creating websites has no idea what is considered high traffic and what is small. This means there is no point in boasting about your attendance to such users. Therefore, it is necessary to clearly understand that the counter is necessary primarily for the webmaster. And it is needed in order to track overall traffic, as well as monitor detailed statistics: what material on the site is most interesting, what is the average time spent on the site, what search queries attracted users, etc.

    2. Which counter to choose

    First, you need to decide which counter to install on your website. I’ll say right away that the choice of really worthwhile free meters is not great. I would definitely recommend adding a counter from liveinternet.ru to your website. This counter has great statistical abilities. For example, it allows you to track search queries (more precisely, it allowed, because now transitions from the PS have begun to be hashed), entry/exit points, the number of page views, transitions from sites, from search engines, etc.

    Also good counters are top100.rambler.ru and metrika.yandex.ru. As a result, I propose installing four counters on the site:

    You can also install Google Analytics (but I usually don’t install it).

    Now I’ll tell you about the main thing: how to install a counter on a website.

    3. Installation of the counter on the site 3.1. Counter from liveinternet.ru

    Form for adding a site to the system: http://www.liveinternet.ru/add.

    I think that it is not worth explaining how to fill out the form when adding a site, since everything is obvious here. The only thing I want to say: in the last paragraph “participation in ratings” do not forget to select a category (if, of course, you plan to participate in overall rating). Next you will be taken to a page where you will be asked to check the correctness of the entered data. If everything is correct, then click on the register button.

    Once on the next page, click on “get html code of the counter”. You will be taken to the counter selection page:

    I like the second type of counters, which show the number of views in 24 hours, the number of visitors in 24 hours and the number of visitors today. After selecting a counter, click on it and you will be taken to the color selection page.

    After this, at the bottom of the page you need to select the type of counter.

    I always select the very first option: “in the form of one picture” (it is the default). Next, at the very bottom of the page there will be a button “get the html code of the counter”, click on it and it will open in front of you new page with code.

    The LiveInternet counter code looks something like this:

    The resulting code must be inserted in the place of your html page where you want the counter to be. I advise you to place it at the very bottom of the page so as not to slow down the page loading.

    I also advise you to close the counters in the tag and add the attribute to the a tag so as not to transfer link juice.

    3.2. Counter from top100.rambler.ru

    First you need to register in Rambler: https://id.rambler.ru/account/external-registration. After that, log in and go to the “add site” page.

    Then follow the instructions. IN general meaning approximately the same as in the first case. Here you will have to fill out a little more fields than on LiveInternet. At the very end you will be asked to select the type of counter:

    After this, you get the counter code and, just like in the first case, insert it in the place on the site where you want it to be displayed.

    The code will look something like this:

    Rambler has become very capricious when it comes to resource moderation. Only white sites are accepted here. If the site is gray, it will be rejected.

    3.3. Counter from metrika.yandex.ru

    To add a site to Yandex Metrica, you must be authorized on Yandex. After this, go to the page http://metrika.yandex.ru/list/ and click “add counter” at the top.

    After this, you will need to fill in the appropriate fields and place the code on the site in the same way. Usually I make the metric counter invisible on the site.

    After you add counters to the site, in a couple of days you can already start analyzing site statistics.

    3.4. Counter from top.mail.ru

    To add a site to TOP Mail, you need to register with Mail.ru. After this, go to the page https://top.mail.ru/add and enter data to add a site.

    This meter has similar options for viewing a meter with LI. Those. almost the same points. In this regard, of course, Yandex Metrica is much more interesting.

    The email counter is good primarily because its rating is visited by many users. From this rating there will be transitions to your site if it has quite a lot of traffic.

    4. How to make the hit counter beautiful

    As a bonus, I'll talk about how to make the counter more beautiful. To do this, you will need to write the following code in your CSS style sheet:

    #cnt a img ( opacity :0.3 ; -moz-opacity :0.3 ; filter :alpha (opacity=40 ); -khtml-opacity : 0.3 ; ) #cnt a :hover img ( opacity :1.0 ; -moz-opacity :1.0 ; filter :alpha (opacity=100 ); -khtml-opacity : 1 ;

    And in the place where you need to insert the meter codes, write the following:

    Meter codes

    After this, you will have counters like on this site, i.e. They are darkened, and when hovered they become bright.