Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik plugins define their API metadata and returns ready to be displayed reports #1485

Closed
mattab opened this issue Jul 18, 2010 · 7 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jul 18, 2010

Required by various plugins, Custom Alerts, PDF generation, custom graph builder, etc.

It should also be used by the Mobile Piwik eventually.

Goal is to have each plugin define the list of API reports they offer:

  • group name
  • report name
  • api method & function to call to request data
  • list of metrics that will be returned + translations in requested language

Note: other plugins can add metrics to other reports too, such as the Goal plugin will add revenue/conversion/conversion rate to all segments that have this data.

@mattab
Copy link
Member Author

mattab commented Jul 18, 2010

(In [2549]) Fixes #1485

  • Adding XML export of multi dim arrays
  • Adding metadata for all plugins that define the API functions, metrics, dimensions, category, report name, metrics translations
  • Could well be extended to include 100% of Piwik report metadata later
  • cleaning up Goals API returned values to ensure consistency with other responses in piwik APIs

@mattab
Copy link
Member Author

mattab commented Jul 20, 2010

See Follow up ticket in #1491

@mattab
Copy link
Member Author

mattab commented Jul 20, 2010

(In [2594]) Refs #1485

  • Fixing wrong metadata for all plugins, cleaning up columns and ensure consistency in API (eg. VisitsSummary.get now returns conversion rate with %)
  • Adding a generic filter Truncate, updated doc at: http://dev.piwik.org/trac/wiki/API/Reference
    filter_truncate ; if set, will truncate the table after $filter_truncate rows. The last row will be named 'Others' (localized in the requested language) and the columns will be an aggregate of statistics of all truncated rows.
  • Adding common helpers to get a "pretty" value from a given metric and column name
  • Adding new time export format that will be used in PDF reports 12:34:56 format

Refs #1486

  • a new filter, AddColumnsProcessedMetricsGoal, can be reused to easily add processed goal metrics for a given datatable. For example:
    $dataTable->filter('AddColumnsProcessedMetricsGoal', array($enable=true, Piwik_DataTable_Filter_AddColumnsProcessedMetricsGoal::GOALS_FULL_TABLE));
    will process all goal metrics (and per goal conv rate, rev per visit, conversions).
    When possible, only reports necessary should be loaded using GOALS_MINIMAL_REPORT or GOALS_OVERVIEW or a given idGoal

@mattab
Copy link
Member Author

mattab commented Jul 23, 2010

(In [2641]) Fixes some issues found in error logs when called with a previous URL format. refactored how to get arrays in API functions in a helper method. Not ideal, but better than before..
Also adding filter Truncate mentionned in refs #1485

@mattab
Copy link
Member Author

mattab commented Jul 24, 2010

(In [2663]) Refs #1485

  • Adding a magic method to request a given report but with all the metadata returned (report name, column list, translations, etc.) as well as the data, already filtered, ready to be displayed. I think this could be incredibly useful to Mobile Piwik Client!! Check out: getProcessedReport($idSite, $date, $period, $apiModule, $apiAction, $apiParameters = false)
  • This is used in the future PDF export plugin refs Plugin to provide PDF export of data #5491
  • Minor updates to UI text

@mattab
Copy link
Member Author

mattab commented Jul 25, 2010

(In [2671]) Refs #1485

  • Ensuring consistency in returned data (zero values are 0% or 0). Also consistency in rounding.
  • Adding test string returned API.getReport() date + metadata for visit with goal conversion
  • Also adding logo.tpl in the release + helper method to access it (will be used to display in logo in PDF for example. Could later be customizable per-site or globally eg.)

@mattab
Copy link
Member Author

mattab commented Jul 28, 2010

(In [2746]) Refs #1485 Better reports/column order in Metadata response + fixing small issues with metadata

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

1 participant