@diosmosis opened this Issue on September 20th 2014 Member

Instead of having hard-coded INDEX_... consts, we can specify a report's columns in Report class metadata, eg,

    $this->columns = array('nb_visits', 'nb_actions', 'nb_conversions', ...);

then in the DB, the columns will have indexes determined by the data in Report metadata, eg,

    'nb_visits' => 32,
    // note: no nb_actions
    'nb_conversions' => 333

will be converted into

    0 => 32,
    2 => 333

This will allow plugins to specify new metrics w/o having to store the full string for each column in the DB.

Will need to provide backwards compatibility, though.

@mattab commented on May 6th 2016 Member

This may be done / refactored as part of the Archiver refactor: https://github.com/piwik/piwik/issues/7470

This Issue was closed on May 6th 2016
Powered by GitHub Issue Mirror