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

Using API for getRowEvolution with nb_visits (2 replies)

$
0
0
I'm trying to get the nb_visits datatables by using the Piwik API like:

apiModule = VisitsSummary; apiAction = get:
http://demo.piwik.org/?module=API&method=API.getRowEvolution&idSite=7&period=range&date=2013-01-01,2013-01-20&apiModule=VisitsSummary&apiAction=get&legendAppendMetric=1&labelUseAbsoluteUrl=1&format=JSON&token_auth=anonymous

or

apiModule = Actions; apiAction = get:
http://demo.piwik.org/?module=API&method=API.getRowEvolution&idSite=7&period=range&date=2013-01-01,2013-01-20&apiModule=Actions&apiAction=get&legendAppendMetric=1&labelUseAbsoluteUrl=1&format=JSON&token_auth=anonymous

But as a result i'm getting this error messages:


<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
	    <strong>There is an error. Please report the message (Piwik 1.12-b14)
	    and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
	    Warning:</strong> <i>array_flip() [&lt;a href=&#039;function.array-flip&#039;&gt;function.array-flip&lt;/a&gt;]: Can only flip STRING and INTEGER values!</i> in <b>/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php</b> on line <b>1194</b>
<br /><br />Backtrace --&gt;<div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik_ErrorHandler(...) called at [:]<br />
#1  array_flip(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php:1194]<br />
#2  Piwik_API_API-&gt;getRowEvolution(...) called at [:]<br />
#3  call_user_func_array(...) called at [/home/piwik-demo/www/demo.piwik.org/core/API/Proxy.php:187]<br />
#4  Piwik_API_Proxy-&gt;call(...) called at [/home/piwik-demo/www/demo.piwik.org/core/API/Request.php:138]<br />
#5  Piwik_API_Request-&gt;process(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/Controller.php:25]<br />
#6  Piwik_API_Controller-&gt;index(...) called at [:]<br />
#7  call_user_func_array(...) called at [/home/piwik-demo/www/demo.piwik.org/core/FrontController.php:125]<br />
#8  Piwik_FrontController-&gt;dispatch(...) called at [/home/piwik-demo/www/demo.piwik.org/index.php:47]</div><br />
 </pre></div><br />
<div style='word-wrap: break-word; border: 3px solid red; padding:4px; width:70%; background-color:#FFFF96;'>
	    <strong>There is an error. Please report the message (Piwik 1.12-b14)
	    and full backtrace in the <a href='?module=Proxy&action=redirect&url=http://forum.piwik.org' target='_blank'>Piwik forums</a> (please do a Search first as it might have been reported already!).<br /><br/>
	    Notice:</strong> <i>Undefined index: dimension</i> in <b>/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php</b> on line <b>1413</b>
<br /><br />Backtrace --&gt;<div style="font-family:Courier;font-size:10pt"><br />
#0  Piwik_ErrorHandler(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php:1413]<br />
#1  Piwik_API_API-&gt;getRowEvolutionMetaData(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php:1245]<br />
#2  Piwik_API_API-&gt;getSingleRowEvolution(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/API.php:1234]<br />
#3  Piwik_API_API-&gt;getRowEvolution(...) called at [:]<br />
#4  call_user_func_array(...) called at [/home/piwik-demo/www/demo.piwik.org/core/API/Proxy.php:187]<br />
#5  Piwik_API_Proxy-&gt;call(...) called at [/home/piwik-demo/www/demo.piwik.org/core/API/Request.php:138]<br />
#6  Piwik_API_Request-&gt;process(...) called at [/home/piwik-demo/www/demo.piwik.org/plugins/API/Controller.php:25]<br />
#7  Piwik_API_Controller-&gt;index(...) called at [:]<br />
#8  call_user_func_array(...) called at [/home/piwik-demo/www/demo.piwik.org/core/FrontController.php:125]<br />
#9  Piwik_FrontController-&gt;dispatch(...) called at [/home/piwik-demo/www/demo.piwik.org/index.php:47]</div><br />
 </pre></div><br />{"label":"","reportData":{"2013-01-01":


same with apiAction = getVisits,..

Is there any other way to get visits of every day of a month? Or any ideas to fix the problem?

Viewing all articles
Browse latest Browse all 4243

Trending Articles