Ways To Avoid Overloading Blog Histats

Ways To Avoid Overloading Blog Histats - Although there are Google Analytics with more accurate data, but until now there are still many bloggers who use histats as a web statistics counter.


Ways To Avoid Overloading Blog Histats - Although there are Google Analytics with more accurate data, but until now there are still many bloggers who use histats as a web statistics counter.


Compared to Google Analytics, with histats it's easier to read blog statistics for beginners too.

However, the more that does not optimize the use of histats on a blog, it needs to be added to add blog loading.

For that, now I will give tricks on how to install the histats code so as not to burden blog loading, if you care about blog loading speed.

The first, my advice is not to use histats that use statistical display on a blog, your blog traffic is very high so as not to be embarrassed too if you intend to show off.

Secondly, you should use the hidden tracker histats code. But even though the hidden tracker histats code already uses asynchronous, it still loads the blog. For that, use my following trick so as not to load the blog.

Like a hidden search history code like the following as an example.

var _Hasync= _Hasync|| [];
_Hasync.push(['Histats.start', '1,4331xxx,4,0,0,0,00010000']);
_Hasync.push(['Histats.fasi', '1']);
_Hasync.push(['Histats.track_hits', '']);
(function() {
var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
hs.src = ('//s10.histats.com/js15_as.js');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
})();

Save your blog's hidden tracker histats code in notepad then save it as histats.js and host it on Github.


Then use the following code and save above the </body> code


<script>
//<![CDATA[
function downloadJSAtOnload(){var d=document.createElement("script");d.src="URL HOSTING histats.js PLACE HERE",document.body.appendChild(d)}window.addEventListener?window.addEventListener("load",downloadJSAtOnload,!1):window.attachEvent?window.attachEvent("onload",downloadJSAtOnload):window.onload=downloadJSAtOnload;
//]]>
</script>


And save the following code under the code <meta charset = 'utf-8' />


<link as='script' href='URL HOSTING histats.js PLACE HERE' rel='preload'/>



Replace the URL HOSTING histats.js PLACE HERE code with the URL hosting your blog histats.js earlier.

Good luck and hopefully useful.