Great News! Try our new tool to convert img to amp-img. Try Now!

Thursday, May 3, 2018

How to Add HISTATS.com Script on AMP HTML Blog

How to Insert and put HISTATS.com Script on AMP HTML Blog. AMP blogspot utotrial on histas.com

How to Insert HISTATS.com Script on AMP HTML Blog

Adding Google Analytics code to a website becomes an important factor for a website. The reason, Analaytics code is planted on a website page, can analyze who and how your visitors come.

Advertisers also usually ask for an analytics report on your website before they place an ad on your website. That way, they will decide whether your website is eligible to host an ad, or not.

In addition to Google Analytics, many other third-party services have the ability to analyze website visitors in realtime. For example piwik, facebook pixel, and also histats that was also widely used by bloggers.

Histats.com features include collecting visitor data such as location, pages visited, referrals, online users, and others. But the uniqueness and advantages of this histats.com, you can add widgets on your website include page views, online users, and the number of visitors.

So the widget can be placed and shown to the blog visitors. And of course it will be more interesting for advertisers.

It's easy to put this widget on your web or blog. You simply register your website, then make counter code according to your wishes. Then just copy and paste the HTML code and javascript provided from the widget you created.

Then, how do I add on a valid blog of AMP HTML that can not use third-party javascript?


Adding the code is slightly different, and must use amp-pixel (built-in) to install code from histats to keep the blog valid AMP.

The first step of course you should be listed on histats.com then register your website. Then, create a widget by clicking the counter code after registering your web.

If it works, then you will get a histats code that you must install on your website. An example is like this:

<!-- Histats.com  START (html only)-->
<a href="/" alt="page hit counter" target="_blank" >
<embed src="http://s10.histats.com/3004.swf"  flashvars="jver=1&acsid=4060030&domi=4"  quality="high"  width="112" height="48" name="3004.swf"  align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" /></a>
<img  src="https://sstatic1.histats.com/0.gif?4060030&101" alt="free geoip" border="0">
<!-- Histats.com  END  -->

All you need to take in the code above is the pixel code only. If seen from the code above, just "address" just like the following which you should take:

https://sstatic1.histats.com/0.gif?4060030&101

Because amp-pixel is a built-in script in main javascript amp-01.js, so you do not need to add additional JS. You simply add the following code to your blog:


<amp-pixel layout='nodisplay' src='https://sstatic1.histats.com/0.gif?4060030&101'></amp-pixel>


*Replace with pixel histats above with your web pixel counter address.

When done, please save and try to refresh your website. It should be noted that Histast takes several hours to verify your website and collect the data of your website visitors.

Good luck and hopefully useful.