This is a changelog for Piwik platform developers. All changes for our HTTP API's, Plugins, Themes, etc will be listed here.
- Some duplicate reports from UserSettings plugin have been removed. Widget URLs for those reports will still work till May 1st 2015. Please update those to the new reports of DevicesDetection plugin.
- os and browser icons are now located in the DevicesDetection plugin. If you are not using the Reporting or Metadata API to get the icon locations please update your paths.
- API responses containing visitor information will now longer contain the fields
screenType
andscreenTypeIcon
as those reports have been completely removed
- The API method
UserSettings.getBrowserVersion
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowserVersions
instead - The API method
UserSettings.getBrowser
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowsers
instead - The API method
UserSettings.getOSFamily
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getOsFamilies
instead - The API method
UserSettings.getOS
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getOsVersions
instead - The API method
UserSettings.getMobileVsDesktop
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getType
instead - The API method
UserSettings.getBrowserType
is deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowserEngines
instead - The API method
UserSettings.getResolution
is deprecated and will be removed from May 1st 2015. UseResolution.getResolution
instead - The API method
UserSettings.getConfiguration
is deprecated and will be removed from May 1st 2015. UseResolution.getConfiguration
instead - The API method
UserSettings.getWideScreen
has been removed
- The tracker proxy (previously in
miscproxy-hide-piwik-url/
) has been moved to a separate repository: https://github.com/piwik/tracker-proxy.
- The HTTP Tracker API does now respond with a HTTP 400 instead of a HTTP 500 in case an invalid
idsite
is used
- New URL parameter
send_image=0
in the HTTP Tracking API to receive a HTTP 204 response code instead of a GIF image. This improves performance and can fix errors if images are not allowed to be obtained directly (eg Chrome Apps).
core:plugin list
lists all plugins currently activated in Piwik.
- The deprecated method
Piwik\SettingsPiwik::rewriteTmpPathWithHostname()
has been removed.
Piwik\SettingsPiwik::rewriteTmpPathWithInstanceId()
has been deprecated. Instead of hardcoding thetmp/
path everywhere in the codebase and then callingrewriteTmpPathWithInstanceId()
, developers should get thepath.tmp
configuration value from the DI container (e.g.StaticContainer::getContainer()->get('path.tmp')
).
- Development related console commands are only available if the development mode is enabled. To enable the development mode execute
./console development:enable
. - The command
php console core:update
does no longer have a parameter--dry-run
. A dry run is now executed by default followed by a question whether one actually wants to execute the updates. To skip this confirmation step one can use the--yes
option.
- Most methods of
Piwik\IP
have been deprecated in favor of the new piwik/network component. - The file
tests/PHPUnit/phpunit.xml
is no longer needed in order to run tests and we suggest to delete it. The test configuration is now done automatically if possible. In case the tests do no longer work check out the[tests]
section inconfig/global.ini.php
- Code for manipulating IP addresses has been moved to a separate standalone component: piwik/network. Backward compatibility is kept in Piwik core.
- Updated AngularJS from 1.2.25 to 1.2.26
- Updated jQuery from 1.11.0 to 1.11.1
- The Auth interface has been modified, existing Auth implementations will have to be modified. Changes include:
- The initSession method has been moved. Since this behavior must be executed for every Auth implementation, it has been put into a new class: SessionInitializer. If your Auth implementation implements its own session logic you will have to extend and override SessionInitializer.
- The following methods have been added: setPassword, setPasswordHash, getTokenAuthSecret and getLogin.
- Clarifying semantics of each method and what they must support and can support.
- Read the documentation for the Auth interface to learn more.
- The
Piwik\Unzip\*
classes have been extracted out of the Piwik repository into a separate component named Decompress.Piwik\Unzip
has not moved, it is kept for backward compatibility. If you have been using that class, you don't need to change anything.- The
Piwik\Unzip\*
classes (Tar, PclZip, Gzip, ZipArchive) have moved to thePiwik\Decompress\*
namespace (inside the new repository). Piwik\Unzip\UncompressInterface
has been moved and renamed toPiwik\Decompress\DecompressInterface
(inside the new repository).
- The
Piwik::setUserHasSuperUserAccess
method is deprecated, instead use Access::doAsSuperUser. This method will ensure that super user access is properly rescinded after the callback finishes. - The class
\IntegrationTestCase
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\SystemTestCase
instead. - The class
\DatabaseTestCase
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\IntegrationTestCase
instead. - The class
\BenchmarkTestCase
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\BenchmarkTestCase
instead. - The class
\ConsoleCommandTestCase
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\ConsoleCommandTestCase
instead. - The class
\FakeAccess
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\Mock\FakeAccess
instead. - The class
\Piwik\Tests\Fixture
is deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\Fixture
instead. - The class
\Piwik\Tests\OverrideLogin
is deprecated and will be removed from February 6ths 2015. Use\Piwik\Framework\Framework\OverrideLogin
instead.
- The pivotBy and related query parameters can be used to pivot reports by another dimension. Read more about the new query parameters here.
- Updated AngularJS from 1.2.13 to 1.2.25
generate:angular-directive
Let's you easily generate a template for a new angular directive for any plugin.
- Piwik 2.8.0 now requires PHP >= 5.3.3.
- If you use an older PHP version, please upgrade now to the latest PHP so you can enjoy improvements and security fixes in Piwik.
- Several APIs will now expose a new metric
nb_users
which measures the number of unique users when a User ID is set. - New APIs have been added for Content Tracking feature: Contents.getContentNames, Contents.getContentPieces
- The
Piwik\Menu\MenuAbstract::add()
method is deprecated in favor ofaddItem()
. Read more about this here: #6140. We do not plan to remove the deprecated method before Piwik 3.0.
- It is now easier to generate the URL for a menu item see #6140, urlForDefaultAction(), urlForAction(), urlForModuleAction()
core:clear-caches
Lets you easily delete all caches. This command can be useful for instance after updating Piwik files manually.
- The
'json'
API format is considered deprecated. We ask all new code to use the'json2'
format. Eventually when Piwik 3.0 is released the'json'
format will be replaced with'json2'
. Differences in the json2 format include:- A bug in JSON formatting was fixed so API methods that return simple associative arrays like
array('name' => 'value', 'name2' => 'value2')
will now appear correctly as{"name":"value","name2":"value2"}
in JSON API output instead of[{"name":"value","name2":"value2"}]
. API methods like SitesManager.getSiteFromId & UsersManager.getUser are affected.
- A bug in JSON formatting was fixed so API methods that return simple associative arrays like
- If an API returns an indexed array, it is now possible to use
filter_limit
andfilter_offset
. This was before only possible if an API returned a DataTable. - The Live API now returns only visitor information of activated plugins. So if for instance the Referrers plugin is deactivated a visitor won't contain any referrers related properties. This is a bugfix as the API was crashing before if some core plugins were deactivated. Affected methods are for instance
getLastVisitDetails
orgetVisitorProfile
. If all core plugins are enabled as by default there will be no change at all except the order of the properties within one visitor.
core:run-scheduled-tasks
Let's you run all scheduled tasks due to run at this time. Useful for instance when testing tasks.
- We removed our own autoloader that was used to load Piwik files in favor of the composer autoloader which we already have been using for some libraries. This means the file
core/Loader.php
will no longer exist. In case you are using Piwik from Git make sure to runphp composer.phar self-update && php composer.phar install
to make your Piwik work again. Also make sure to no longer includecore/Loader.php
in case it is used in any custom script. - We do no longer store the list of plugins that are used during tracking in the config file. They are dynamically detect instead. The detection of a tracker plugin works the same as before. A plugin has to either listen to any
Tracker.*
orRequest.initAuthenticationObject
event or it has to define dimensions in order to be detected as a tracker plugin.
- Javascript Tracking API: if you are using
getCustomVariable
function to access custom variables values that were set on previous page views, you now must also callstoreCustomVariablesInCookie
before the first call totrackPageView
. Read more about Javascript Tracking here. - The settings API will receive the actual entered value and will no longer convert characters like
&
to&
. If you still want this behavior - for instance to prevent XSS - you can define a filter by setting thetransform
property like this:$setting->transform = function ($value) { return Common::sanitizeInputValue($value); }
- Config setting
disable_merged_assets
moved fromDebug
section toDevelopment
. The updater will automatically change the section for you. API.getRowEvolution
will throw an exception if a report is requested that does not have a dimension, for instanceVisitsSummary.get
. This is a fix as an invalid format was returned before see #5951MultiSites.getAll
returns from now on always an array of websites. In the past it returned a single object and it didn't contain all properties in case only one website was found which was a bug see #5987
The following events are considered as deprecated and the new structure should be used in the future. We have not scheduled when those events will be removed but probably in Piwik 3.0 which is not scheduled yet and won't be soon. New features will be added only to the new classes.
API.getReportMetadata
,API.getSegmentDimensionMetadata
,Goals.getReportsWithGoalMetrics
,ViewDataTable.configure
,ViewDataTable.getDefaultType
: use Report class instead to define new reports. There is an updated guide as well Part1WidgetsList.addWidgets
: use Widgets class instead to define new widgetsMenu.Admin.addItems
,Menu.Reporting.addItems
,Menu.Top.addItems
: use Menu class insteadTaskScheduler.getScheduledTasks
: use Tasks class instead to define new tasksTracker.recordEcommerceGoal
,Tracker.recordStandardGoals
,Tracker.newConversionInformation
: use Conversion Dimension class insteadTracker.existingVisitInformation
,Tracker.newVisitorInformation
,Tracker.getVisitFieldsToPersist
: use Visit Dimension class insteadViewDataTable.addViewDataTable
: This event is no longer needed. Visualizations are automatically discovered if they are placed within aVisualizations
directory inside the plugin.
As a plugin developer you might want to reuse existing translation keys. You can now find all available translations and translation keys by opening the page "Settings => Development:Translation search" in your Piwik installation. Read more about internationalization here.
It is now possible to use the filter_sort_column
parameter when requesting Live.getLastVisitDetails
. For instance &filter_sort_column=visitCount
.
We are using @since
annotations in case we are introducing new API's to make it easy to see in which Piwik version a new method was added. This information is now displayed in the Classes API-Reference.
- Report to add a new report
- Action Dimension to add a dimension that tracks action related information
- Visit Dimension to add a dimension that tracks visit related information
- Conversion Dimension to add a dimension that tracks conversion related information
- Dimension to add a basic non tracking dimension that can be used in
Reports
- Widgets to add or modfiy widgets
- These Menu classes got new methods that make it easier to add new items to a specific section
- MenuAdmin to add or modify admin menu items.
- MenuReporting to add or modify reporting menu items
- MenuUser to add or modify user menu items
- Tasks to add scheduled tasks
generate:theme
Let's you easily generate a new theme and customize colors, see the Theming guidegenerate:update
Let's you generate an update filegenerate:report
Let's you generate a reportgenerate:dimension
Let's you enhance the tracking by adding new dimensionsgenerate:menu
Let's you generate a menu class to add or modify menu itemsgenerate:widgets
Let's you generate a widgets class to add or modify widgetsgenerate:tasks
Let's you generate a tasks class to add or modify tasksdevelopment:enable
Let's you enable the development mode which will will disable some caching to make code changes directly visible and it will assist developers by performing additional checks to prevent for instance typos. Should not be used in production.development:disable
Let's you disable the development mode
Find the general Piwik Changelogs for each release at piwik.org/changelog