I am wondering whether you guys provide API access to the web statistics. I would like to build an automatic tool to extract the statistics hourly and do some visualizations with it. Thanks, Timo
Use Google Analytics?
There’s no such APIs on our end. If you wish to retrieve hosting statistics, you have to come up a way to authenticatr and get the graphs from the control panel, which is something our client area does.
Additionally, we don’t have live hosting statistics. It makes no difference for you to check it every 5 minutes or a day.
If you are not talking about hosting statistics, however, please read about what chiucs123 posted above.
I would recommend against that. It only tracks users that want to be tracked, and some bots and page loads are never recorded. If you just want a general idea of site visitors, GA is ok, but if you want to track hits and stuff its quite bad.
Hi,
thank you very much for your reply. I am interested to see if people go to my websites. What I am doing right now is recording the “hits usage” which is reset every 24 hours at around 6AM. Then I plot that number against days. If there is no specific usuage of my webpages I usually get a hits usage score in a day between 0-10. However, if there is specific use of my webpages the hits usage goes >100, depending on the amount of visits of course. In order to not record that number manually every day I was hoping to write a little script to extract that number automatically. Webscraping does not work due to CAPCHA security. Since it looks like APIs are not available, do you have other recommendations for me? I was thinking of implementing Google Analytics, but I believe that does not come for free and is overkilling the purpose. I only want to know roughly, IF there is traffic over background. Thx, Timo
There are indeed no API for statistics. The client area does have some data, but it mostly works by scraping the control panel. And it’s no coincidence that the graphs in the client area are the exact same images as you can see in the control panel.
Google Analytics is a free service you can use to get more insight into the traffic to your website. It’s quite detailed because it can give you a lot of insight in not just “how much traffic is there”, but also where does the traffic come from, and how do your visitors interact with your site. But Google Analytics works with a Javascript snippet, which is easily blocked by ad/tracking blockers.
If you want something simple, you could also implement a hit counter through PHP code on your own site. You can store a basic counter in a MySQL or SQLite database, or simply in a text file. Then, any time the script is triggered, you increase the number by one. Because the check is run on the server, it cannot be blocked by browsers.
I like the idea with a counter! That does not give me time resolution, but at least I can get a rough idea about usage. As for the Google Analytics, that would be definitely an overkill - but I will give it another look anyway. THX, that helped!
You can make the hits counter as fancy as you want of course. You could store every hit in the database with a timestamp, and use that to make plot nice graphs showing hits over time.
Do keep in mind that the fancier you make it, the more data you’ll need to store and the slower the querying will become.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.