Hi all, I’ve been using Piwik for some weeks to try out if it fits my needs. I’ve created custom plugin widgets which use a custom table in the piwik table. Everything works how I want (graphs, tables etc).
Now I want these tables and graphs in a report. But I’m doing something wrong because I only get tables in the reports with columns I don’t supply in my Piwik_DataTable.
In “\piwik\plugins\UserSettings\UserSettings.php”: I have added a seperate array
public function getAppViews()
$views = array();
$value = 10;
for ($i = 0; $i < 10; $i++)
$views[$i] = $value++;
// convert this array to a DataTable object
$dataTable = new Piwik_DataTable();
The report outputted is a table (possible to do graphs?) with the columns ‘Views’ (which has the values of my filled table), and irrelevant columns: ‘Visits’, ‘Unique visitors’, ‘Actions’, etc.
So my questions are:
Why are these columns added? And how do I get rid of it. These are not defined in the Piwik_DataTable.
How can I make a report that looks the same as the widget only outputted to for example PDF?
Good news: we have now released the Custom Reports feature for Piwik!
Custom reports lets you choose which dimensions and metrics you want to see. You can combine multiple dimensions (up to 3) and as many metrics as you need.
The custom reports can be emailed to your partners or customers, and have their own menu entry in the Piwik report list. You can even setup advanced filters to further customise the reports.