How to add the code of the counter

How to add the code of the counter

The code of the counter received by you through a system for calculation of visitors of the website needs to be added to the code of pages on which you want to display statistics. Also some hit counters consider only users who viewed pages with the inline code of the counter. It is possible to add the code of the counter in the following ways.

Instruction

1. The code of the counter of visitors of a resource – a kanter (counter), - which you received from any service for calculation of guests of the website (for example, HotLog, 24Log, Rating Openstat, LiveInternet, etc.), represents a script with the client's ID. Such script comprises usually about 10 lines of the code and begins with an auxiliary word, for example <! - Counter->. To install the counter on pages of the static website made on naked HTML it is necessary to add the code of the counter (script) to all pages, at the same time, having used <br> tags for line feed and <left>, <center>, <right> for alignment. It is especially important if the banner of the counter is as a result in a table cell. The code can be added both through online or offline the HTML-editor, and through the Notepad, NotePad ++ and other text editors.

2. With the websites constructed on management systems – CMS - everything is much easier. In WordPress, DataLife Engine, Joomla and other content management systems you can add widgets or modules, having them in a certain column on pages of the website. Having created a widget once and having placed in it the code of the counter, it will be displayed on all pages of the website to which the standard template is applied.

3. Also you can place the HTML-code of the counter in one of basic PHP pages in the internal editor of CMS. For example, in the footer.php or page.php file. The counter is duplicated on all pages of the website.

4. In the popular free content management system of uCoz for one-time adding of the block with the counter of visitors visit the website under the login of an administartor and in a top panel start the designer. After that select the Add the Block item in the administrator's panel, drag it to the place necessary for you and click on a gear icon. In the appeared window select the HTML tab and add to it the code of a script then click "Save" and also save changes in the panel of the administrator (section "Designer"). Also in the control panel of the website uCoz offers own hit counters.

Author: «MirrorInfo» Dream Team


Print