Very simple counter display on html website

Hello, I just started using this and after searching don’t see a clear answer for this.

I would like to place a visitor count (numbers only) on a static html website to show how many visitors or visits. I found some documention on how to display a lot of stuff but not a simple thing like this.


you can make it whit php and the api from your piwik.

my code
–> change
Sign in - Piwik == your piwik addres
".$site[‘idsite’]." == id of your site
token == token from a account on piwik

    $data = json_decode(file_get_contents("".$site['idsite']."&period=range&date=2000-01-01,today&format=json&token_auth=token"  , FILE_USE_INCLUDE_PATH), true);
 echo 'this site have'.$data['nb_actions'].' vieuws,<br/>From '.$data['nb_visits'].' visiters.';

Hi and thanks for your reply. I don’t quite understand this. Can the php be used on a normal html site?

Do you have this as an example anywhere.


see the right side whit the title "Statestieken"
you can load the code whit jquery into a html page (i do it so the paga load faster els it must wait for piwik)

Hello christophe195!

Thanks for your work and help, but could you also take a look at this thread:,110695

It is regarding the same subject, but more detailed and with piwik 2.x

I would appreciate your help!