Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Get stats from piwik database (1 reply)

$
0
0
Hi! I am including piwik statistics in my backoffice and i need to get information about the visits in each page.
I'm using the next code:

$url="$this->site?module=API&method=Actions.get&idSite=1&period=range&date=$this->datainicio,$this->datafim&format=JSON&token_auth=$this->token$pag";
$fetched = file_get_contents($url);
$data = json_decode($fetched);
return $data->nb_pageviews;

I receive the correct information but i'm putting it in a table, so it needs many requests what slows my website.

Someone knows another way of get the information?
I tried read the schema of the datebase but it seems very difficult build the query's for that...

Viewing all articles
Browse latest Browse all 4243

Trending Articles