📜 ⬆️ ⬇️

We accelerate counters: from myths to reality

We accelerate counters: from myths to reality

Not only beginners, but also advanced optimizers come to a standstill when it comes to attendance counters - it’s usually a JS code that needs to be pasted onto the page (and it’s good if you don’t require it to be as close as possible to the opening body tag) change. Otherwise, the statistics simply will not work.

In fact, everything is not so bad. Rather, everything is very good, but very few people know about it :)
')

Look inside



What is the JS counter code? Usually (in 99% of cases) he “pulls” a set of parameters from the client's environment (URL of the current page, URL of the page from which they switched to the current, browser, OS, etc.), which are transmitted to the statistics server. All the bells and whistles of the counters are connected with ensuring the maximum accuracy of the transmitted information (cross-browser compatibility, in fact). The most powerful (Omniture, Google Analytics) use their own variables and events to strengthen the marketing component.

But now it's not about that. How does the data collected on the client get to the statistics server? Everything is very simple: a unique element is created in the document, in the URL of which all necessary values ​​are “stitched” (usually as GET parameters). This URL leads, as you can guess, to the statistics server, where the data is put into the database and somehow displayed in the administrator interface.

Read more on webo.in →

Source: https://habr.com/ru/post/39942/


All Articles