99 KiB
Matomo Platform Changelog
This is the Developer Changelog for Matomo platform developers. All changes in our HTTP API's, Plugins, Themes, SDKs, etc. are listed below.
The Product Changelog at matomo.org/changelog lets you see more details about any Matomo release, such as the list of new guides and FAQs, security fixes, and links to all closed issues.
Matomo 4.12.0
Breaking Changes
- When removing a user through the
UsersManager.deleteUserAPI using a session authentication, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request. - When adding a user through the
UsersManager.addUserAPI using a session authentication, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request. - When inviting a user through the
UsersManager.inviteUserAPI using a session authentication, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request.
New PHP events
- Added new event
Login.userRequiresPasswordConfirmation, which can be used in login plugins to circumvent the password confirmation in UI and for certain API methods - When removing a site through the
SitesManager.deleteSiteAPI using a session authentication, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request.
New Privacy Opt-Out Options
- The privacy manager iframe opt-out UI has been replaced with a choice of either generating JavaScript opt-out code which uses the Matomo tracker, or generating self-contained JavaScript opt-out code which directly sets the consent cookies. Existing iframe opt-outs will still work, but iframe opt-out code will no longer be generated by the UI as support for third party cookies in iframes is being discontinued by most major browsers.
JavaScript Tracker
New APIs
- The methods
setExcludedReferrersandgetExcludedReferrershave been added to the JavaScript tracker. They allow setting and receiving the referrers the JavaScript tracker should ignore. If a referrer matches an entry on that list, it will not be passed with the tracking requests and the attribution cookie will stay unchanged. This can for example be used if you need to forward your users to an external service like SSO or payment and don't want any visits or conversions being attributed to those services.
Matomo 4.11.0
Breaking Changes
- The user management UI no longer allows direct creation of a new user (with a password). Instead an invitation can be sent via email. Directly creating a new user is still possible using the API.
New config.ini.php settings
- A general config setting
force_matomo_http_requestdefaulting to 0. If the Matomo instance can't make requests to matomo.org via HTTPS this can be set to 1 to force matomo marketplace and matomo api requests to use HTTP instead of HTTPS.
New PHP events
-
Added new event
UsersManager.inviteUser.end, which is triggered after a new user has been invited -
Added new event
UsersManager.inviteUser.resendInvite, which is triggered after the invitation to a user has been resent -
Added new event
UsersManager.inviteUser.accepted, which is triggered after an invitation has been accepted -
Added new event
UsersManager.inviteUser.declined, which is triggered after an invitation has been declined -
The existing event
UsersManager.addUser.endwill only be triggered when a user is added using the API.
Matomo 4.10.0
Breaking Changes
- As access to files like
plugin.jsonmight reveal version details,jsonfiles will now longer be considered as static files that can be served safely. Thereforejsonwill no longer be included in the list of static file extensions in generated.htaccessfiles.
Matomo 4.8.0
New config.ini.php settings
- The config setting
enable_default_location_providerinTrackerhas been added. By setting this option to 0, you can disable the default location provider. This can be used to prevent the geolocator to guess the country based on the users language, if the configured provider doesn't provide any results.
New PHP events
- Added new event
Segment.filterSegments. Plugins can use this to filter segment definitions.
Matomo 4.7.0
Deprecated APIs
- The
piwik-fieldand related directives have been converted to Vue and thetemplate-fileattribute is now considered deprecated and will be removed in Matomo 5. Instead, thecomponentproperty should be used to add a new form field, it should be an object with two properties that reference a Vue component,pluginandname, wherepluginis the plugin the Vue component is located in andnameis the Vue name of the component's export.
New Change Notifications
- Plugins can now provide a list of changes which will be displayed as part of the "What's New?" menu notification. Learn more about how this works in the developer guide.
Matomo 4.6.0
New Framework
- We have begun introducing Vue 3 as the frontend framework to replace AngularJS. You can learn more about it in our developer guide.
New APIs
- New API Methods
SecurityPolicy.addPolicy,SecurityPolicy.overridePolicy,SecurityPolicy.removeDirective,SecurityPolicy.allowEmbedPage,SecurityPolicy.disableallow developers to modify or disable the default Content Security Policy.Plugins\Controllerhas a new membersecurityPolicyso plugins can use$this->securityPolicyto access these new methods when a custom Content Security Policy is needed.
Breaking Changes
- With the introduction of Vue 3 we are also dropping support for IE11. All new supported browsers are determined by the browserslist tool. Running
npx browserslistwill list the browsers currently supported. - When the Ecommerce feature is disabled for a site, then the Live API no longer returns the Ecommerce related visitor properties
totalEcommerceRevenue,totalEcommerceConversions,totalEcommerceItems,totalAbandonedCartsRevenue,totalAbandonedCartsandtotalAbandonedCartsItems. - Content Security Policy (added in Matomo 4.4.0) is no longer in Report Only mode by default.
New config.ini.php settings
- The config setting
contact_email_addressinGeneralhas been added. It will be used as contact email address for users. If not defined (default) all email addresses of all super users will be used instead, which equals the behavior it used to be.
Matomo 4.4.0
Breaking Changes
- The
logmemethod for automatic logins is now disabled by default for new installations. For existing installations it will be enabled automatically on update. If you do not need it please consider disabling it again for security reasons by settinglogin_allow_logme = 0inGeneralsection ofconfig.ini.php. - The redirect using the
urlparam for the automatic login actionlogme, will no longer do redirects to untrusted hosts. If you need to do redirects to other URLs on purpose, please add the according hosts astrusted_hostsentry inconfig.ini.php
New config.ini.php settings
- When determining the client IP address from proxy headers like X-Forwarded-For, Matomo will by default look at the first IP in the list. If you need to read the last IP instead, the new INI config option
[General] proxy_ip_read_last_in_listbe set to1. Using the last IP can be more secure when you are using proxy headers in combination with a load balancer. - Matomo logs can now be written into "errorlog" (logs using the error_log() php function) and "syslog" (logs to the syslog service) (to complement existing log writers: "screen", "file", "database"). Learn more.
New commands
- Added new command
core:versionwhich returns the Matomo version number.
Matomo 4.3.1
New commands
- Added new command
core:create-security-fileswhich creates some web server security files if they haven't existed previously (useful when using for example Apache or IIS web server).
Matomo 4.3.0
JavaScript Tracker
Breaking changes in Matomo JS tracker
- Before the JS tracker method,
enableLinkTrackingdid not follow the DOM changes, from this version when the DOM updates, Matomo automatically adds event listeners for new links on the page. It makes it easier to track clicks on links in SPAs. From this version, if we use theaddListenermethod to add event listener manually after the DOM has changed and theenableLinkTrackingis turned on we will track the click event for that element twice.
Breaking Changes
- Before every JS error was tracked, from this version the same JS error will be only tracked once per page view. If the very same error is happening multiple times, then it will be tracked only once within the same page view. If another page view is tracked or when the page reloads, then the error will be tracked again.
- It's no longer possible to store any class instances directly in the session object. Please use arrays or plain data instead.
Upcoming Breaking Changes
- In Matomo 4.3.0 we have added a 'passwordConfirmation' parameter to the CorePluginsAdmin.setSystemSettings API method. It is currently optional, but will become mandatory in version 4.4.0. Plugin developers and users of the API should make sure to update their plugins and apps before this happens.
New config.ini.php settings
- The
password_hash_algorithm,password_hash_argon2_threads,password_hash_argon2_memory_costandpassword_hash_argon2_time_costINI config options have been added to allow using specificpassword_hashalgorithms and options if desired. - The
enable_php_profilerINI config option was added. This must now be set to 1 before profiling is allowed in Matomo.
Matomo 4.2.0
New config.ini.php settings
- A config setting
geolocation_download_from_trusted_hostswas introduced. Downloading GeoIP databases will now be limited to those configured hosts only.
Matomo 4.1.1
Changed config.ini.php settings
- The config settings
login_password_recovery_email_addressandlogin_password_recovery_namehave been removed to avoid possible smtp problems when sending recovery mails.noreply_email_addressandnoreply_email_namewill be used instead.
Matomo 4.0.0
JavaScript Tracker
Breaking changes in Matomo JS tracker
- Matomo no longer polyfills the
JSONobject in the JavaScript tracker. This means IE7 and older, Firefox 3 and older will be no longer suppported in the tracker. - The JavaScript tracker now uses
sendBeaconby default if supported by the browser. You can disable this by calling the tracker methoddisableAlwaysUseSendBeacon. As a result, callback parameters won't work anymore and a tracking request might not appear in the developer tools. This will improve the load time of your website. Tracking requests will be sent as POST request instead of GET but the parameters are by default included in the URL so they don't go lost in a redirect. - The JS tracker event
PiwikInitializedhas been renamed toMatomoInitialized - Support for tracking and reporting of these browser plugins has been discontinued: Gears, Director
- Plugins that extend the JS tracker should now add their callback to
matomoPluginAsyncInitinstead ofpiwikPluginAsyncInit - The visitor ID cookie now contains less data (due to the _idvc, _idts, _viewts and _ects tracking parameters no longer being used). This is a breaking change if you use the Matomo PHP Tracker and forward the visitor cookie to it, and you will need to upgrade the PHP tracker to use with Matomo 4.
- The tracker method
setVisitStandardLengthhas been removed as there is no need for it anymore. - The tracker method
setGenerationTimeMs(generationTime)has been removed as the performance API is now used. Any calls to this method will be ignored. There is currently no replacement available yet.
Deprecations in Matomo JS tracker
- The JS Tracker method
getPiwikUrlhas been deprecated andgetMatomoUrlshould be used instead. - The JS Tracker init method
piwikAsyncInithas been deprecated andmatomoAsyncInitshould be used instead. - The JS object
window.Piwikhas been deprecated andwindow.Matomoshould be used instead.
Recommendations for Matomo JS tracker
These are only recommendations (because we will keep backward compatibility for many more years), but we do recommend you update your code for consistency and for future proofing your tracking:
- If using the
piwik_ignorecss class to ignore outlinks we recommend replacing it withmatomo_ignore - If using the
piwik_downloadcss class to mark a link as download we recommend replacing it withmatomo_download - If using content tracking, we recommend replacing the following CSS classes should they be used
piwikTrackContent,piwikContentPiece,piwikContentTarget, andpiwikContentIgnoreInteractionwithmatomoTrackContent,matomoContentPiece,matomoContentTarget, andmatomoContentIgnoreInteraction. - We also encourage using the
matomo.jsJS tracker file instead ofpiwik.jsandmatomo.phptracker endpoint instead ofpiwik.phpendpoint.
New APIs
- A new JS tracker method
getMatomoUrlhas been added which replacesgetPiwikUrl.
HTTP APIs
Breaking changes in HTTP API
Format changes
- The
JSON2API format has now been deprecated and is now applied by default. The JSON2 renderer will be removed in Matomo 5 and we recommend switching to theJSONrenderer. - The
JSONrenderer now behaves like the previousJSON2renderer did. This means arrays like['a' => 0, 'b' => 1]will be rendered in JSON as{"a":0,"b":1}instead of[{"a":0,"b":1}]. This impacts these API methods:- API.getSettings
- Annotations.get
- Goals.getGoal
- UsersManager.getUser
- UsersManager.getUserByEmail
- SitesManager.getSiteFromId
- The API response format
phphas been removed. - The response of an individual request within the bulk request of
API.getBulkRequestmay change if the API returns a scalar value (eg5). In this case the response will be no longer5but for example{value: 5}
Method changes
- The API method
UsersManager.getTokenAuthhas been removed. Instead you need to useUsersManager.createAppSpecificTokenAuthand store this token in your application. - The API method
UsersManager.createTokenAuthhas been removed. Instead you need to useUsersManager.createAppSpecificTokenAuthand store this token in your application. - The API method
DevicesDetection.getBrowserFamilieshas been removed. Instead you need to useDevicesDetection.getBrowsers - The API method
CustomPiwikJs.doesIncludePluginTrackersAutomaticallyhas been renamed toCustomJsTracker.doesIncludePluginTrackersAutomatically - The API method
Live.getLastVisitsForVisitorhas been removed. UseLive.getVisitorProfileinstead. - The API method
Live.getLastVisitshas been removed. UseLive.getLastVisitsDetailsinstead. - These API methods have been removed:
API.getDefaultMetricTranslations,API.getLogoUrl,API.getHeaderLogoUrl,API.getSVGLogoUrl,API.hasSVGLogo - These API methods have been removed:
SitesManager.getSitesIdWithVisits,SitesManager.isSiteSpecificUserAgentExcludeEnabled,SitesManager.setSiteSpecificUserAgentExcludeEnabled - These API methods have been removed:
Referrers.getKeywordsForPageUrlandReferrers.getKeywordsForPageTitle. UseReferrers.getKeywordsinstead in combination with aentryPageUrlorentryPageTitlesegment. - The parameter
aliasfrom the API methodsUsersManager.addUserandUsersManager.updateUserhas been removed.
HTTP Tracking API
- An optional new tracking parameter called
cahas been added which can be used for tracking requests that aren't page views see #16569
PHP Plugin API
New PHP events
- Added new event
Db.getTablesInstalled, plugins should use to register the tables they create.
Breaking changes in PHP events
- The event
CustomPiwikJs.piwikJsChangedhas been renamed toCustomJsTracker.trackerJsChanged - The event
CustomPiwikJs.shouldAddTrackerFilehas been renamed toCustomJsTracker.shouldAddTrackerFile - The event
CustomMatomoJs.shouldAddTrackerFilehas been renamed toCustomJsTracker.manipulateJsTracker - The event
Live.getAllVisitorDetailshas been removed. Use aVisitorDetailsclass instead (see Live plugin). - The event
Live.getExtraVisitorDetails'has been removed. Use theVisitorDetailsclass within each plugin instead. - The event
Piwik.getJavascriptCodehas been renamed toTracker.getJavascriptCode. - The event
LanguageManager.getAvailableLanguageshas been removed. UseLanguagesManager.getAvailableLanguagesinstead. - The
$completedparameter for the 'CronArchive.archiveSingleSite.finish' event has been removed. For both this event and the CronArchive.archiveSingleSite.start event, a new parameter is added for the process' pid. Multiple processes can now trigger this event for the same site ID.
Removed methods and constants in PHP Plugin API
- The method
\Piwik\Plugin::getListHooksRegistered()has been removed. Use\Piwik\Plugin::registerEvents()instead - The method
\Piwik\Piwik::doAsSuperUser()has been removed. Use\Piwik\Access::doAsSuperUser()instead - The method
\Piwik\SettingsPiwik::isPiwikInstalled()has been removed. Use\Piwik\SettingsPiwik::isMatomoInstalled()instead - The method
\Piwik\Updates::getSql()has been removed. Use\Piwik\Updates::getMigrations()instead - The method
\Piwik\Updates::getMigrationQueries()has been removed. Use\Piwik\Updates::getMigrations()instead - The method
\Piwik\Updates::executeMigrationQueries()has been removed. Use\Piwik\Updates::executeMigrations()instead - The method
\Piwik\Updates::update()has been removed. Use\Piwik\Updates::doUpdate()instead - The method
\Piwik\Updater::updateDatabase()has been removed. The method is not needed anymore. - The method
\Piwik\Common::json_encode()has been removed. Usejson_encode()instead - The method
\Piwik\Common::json_decode()has been removed. Usejson_decode()instead - The method
\Piwik\Common::getContinentsList()has been removed. Use\Piwik\Intl\Data\Provider\RegionDataProvider::getContinentList()instead - The method
\Piwik\Common::getCountriesList()has been removed. Use\Piwik\Intl\Data\Provider\RegionDataProvider::getCountriesList()instead - The method
\Piwik\Common::getLanguagesList()has been removed. Use\Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguagesList()instead - The method
\Piwik\Common::getLanguageToCountryList()has been removed. Use\Piwik\Intl\Data\Provider\LanguageDataProvider::getLanguageToCountryList()instead - The method
\Piwik\Site::getCurrencyList()has been removed. Use\Piwik\Intl\Data\Provider\CurrencyDataProvider::getCurrencyList()instead - The method
\Piwik\Piwik::setUserHasSuperUserAccess()has been removed. Use\Piwik\Access::doAsSuperUser()instead - The class
\Piwik\MetricsFormatterhas been removed. UsePiwik\Metrics\FormatterorPiwik\Metrics\Formatter\Htmlinstead - The class
\Piwik\Registryhas been removed. Use\Piwik\Container\StaticContainerinstead - The class
\Piwik\TaskSchedulerhas been removed. Use\Piwik\Scheduler\Schedulerinstead - The class
\Piwik\DeviceDetectorFactoryhas been removed. Use\Piwik\DeviceDetector\DeviceDetectorFactoryinstead - The class
\Piwik\ScheduledTaskhas been removed. Use\Piwik\Scheduler\Taskinstead. - The class
\Piwik\Translatehas been removed. Use\Piwik\Translation\Translatorinstead. - The class
\Piwik\Plugins\Login\SessionInitializeris no longer considered API as it is no longer needed. - The class
\Piwik\Container\StaticContainerstill exists but we no longer consider it an API and constructor injection should be used instead where possible. - The method
Piwik\Columns\Dimension::factoryhas been removed. UseDimensionsProvider::factoryinstead. - The method
Piwik\Config::resethas been removed. Use thereloadmethod instead. - The method
Piwik\Config::inithas been removed. Use thereload()method instead. - The method
Piwik\Db::getColumnNamesFromTablehas been removed. Use theTableMetadata::getColumnsmethod instead. - The method
Piwik\Session\SessionInitializer::getHashTokenAuthhas been removed. There is no need for this method anymore. - The method
Piwik\Tracker::getDatetimeFromTimestamphas been removed. UsePiwik\Date::getDatetimeFromTimestampinstead. - The method
Dimension::addSegment()has been removed. See new implementation ofDimensionSegmentFactory::createSegmentfor a replacement - The constant
Piwik\Plugins\Goals\API::NEW_VISIT_SEGMENThas been removed. UsePiwik\Plugins\VisitFrequency\API::NEW_VISITOR_SEGMENTinstead. - The signature of
Dimension::configureSegments()has been changed. Similar to configuring Metrics it now takes two parametersSegmentsList $segmentsListandDimensionSegmentFactory $dimensionSegmentFactory. - The signature of the event
Segment.addSegmentshas been changed. It now has one parameterSegmentsList $list, which allows adding new segments to the list - The core plugin
CustomPiwikJshas been renamed toCustomJsTracker - The class
Piwik\Plugins\CustomPiwikJs\TrackerUpdaterhas been renamed toPiwik\Plugins\CustomJsTracker\TrackerUpdater - The method
Piwik\Cookie::setno longer accepts an array as value Zend_Validateand all subclasses have been completely removed.- Matomo's mail component (
Piwik\Mail) has been rewritten:- Zend_Mail has been removed.
Piwik\Mailis now an independet class. - PHPMailer is now used for sending mails in
\Piwik\Mail\Transportand can be replaced using DI. - Various methods in
Piwik\Mailhave been removed or changed their signature.
- Zend_Mail has been removed.
New APIs
- A new API
UsersManager.createAppSpecificTokenAuthhas been added to create an app specific token for a user. - A new method
Common::hashEqualshas been added for timing attack safe string comparisons. - Reporting API: It is now possible to apply
hideColumnsrecursively to nested values by settinghideColumnsRecursively=1. For allLiveapi methods this is the default behaviour.
Other Breaking changes
- When embedding reports (widgets) into a different site, it is no longer possible to use authentication tokens of users with at least write access, unless the
[General] enable_framed_allow_write_admin_token_authis set. This means if you currently rely on this functionality, you will need to update your matomo config when updating to Matomo 4. Alternatively, create a user withviewaccess and use the token of this user to embed the report. - The log importer in
misc/log-analyticsnow supports Python 3 (3.5, 3.6, 3.7 or 3.8), it will no longer run with Python 2. If you have any automated scripts that run the importer, you will have to change them to use the Python 3 executable instead. - Deprecated
piwikfont was removed. Usematomofont instead - The JavaScript AjaxHelper does not longer support synchronous requests. All requests will be sent async instead.
- The console option
--piwik-domainhas been removed. Use--matomo-domaininstead - The controller action
Proxy.redirecthas been removed. Instead link to the URL directly in HTML and set an attributerel="noreferrer noopener" - GeoIP Legacy support has been fully removed. Users of GeoIP Legacy need to set up a new location provider like GeoIP2, otherwise the default location provider will be used.
- Site search category and count are no longer stored as custom variables. That also means they will now have an extra field in action details and no longer appear in custom variables.
- The dimension and
log_link_visit_actioncolumn interaction_position has been renamed to pageview_position. If your database queries rely on the column you can simply replace the name. - The metric (avg.) page generation time has been deprecated. It is no longer possible to track it. Already tracked values will still be shown in old reports. More detailed performance metrics are now available in PagePerformance plugin.
- Added support for campaign name parameter
matomo_campaign/mtm_campaignand campaign keyword parametermatomo_kwd/mtm_kwd - The following dimensions have been removed and replaced with versions that measure seconds: visitor_days_since_first, visitor_days_since_last, visitor_days_since_order
- The _idvc, _idts, _viewts and _ects tracker parameters are no longer used, the values are calculated server side. Note: tracking these values server side means replaying log data in the past will result in inaccurate values for these dimensions.
- The Dependency Injection library PHP-DI was updated. Some definitions need to be updated:
- The Method
\DI\object()has been removed. You can use\DI\autowire()or\DI\create()instead. - The Method
\DI\link()has been removed. Use\DI\get()instead. - Defining global observer functions in config now requires the functions to be wrapped in
\DI\value(), unless they are a factory.
- The Method
New config.ini.php settings
host_validation_use_server_name = 0, if set to 1, Matomo will prefer using SERVER_NAME variable over HTTP_HOST. This can add an additional layer of security, as SERVER_NAME can't be manipulated by sending custom host headers when configured correctly.
Matomo 3.14.0
New API
The following new JavaScript tracker methods have been added:
_paq.push(['setVisitorId', visitorId]);. This can be used to force a specific visitorId. It takes a 16 digit hexadecimal string._paq.push(['requireCookieConsent']);. Call this method if cookies should be only used when consent was given._paq.push(['rememberCookieConsentGiven']);. Call this method when a user gives you cookie consent._paq.push(['forgetCookieConsentGiven']);. Call this method when a user revokes cookie consent._paq.push(['setCookieConsentGiven']);. Call this method to let the tracker know consent was given for the current page view (won't be remembered across requests).- For more info on consent have a look at https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent
Matomo 3.13.6
API Changes
- The first parameter
userLoginin theUsersManager.getUserPreferencemethod is now optional and defaults to the currently authenticated user login.
Matomo 3.13.5
New API
- A new event
ArchiveProcessor.ComputeNbUniques.getIdSiteswas added so plugins can change which site IDs should be included when processing the number unique visitors and users for a specific site.
Matomo 3.13.1
Deprecations
- The methods
\Piwik\Plugins\SitesManager\isSiteSpecificUserAgentExcludeEnabled()and\Piwik\Plugins\SitesManager\setSiteSpecificUserAgentExcludeEnabled()have been deprecated. - The method
\Piwik\SettingsServer::isMatomoForWordPress()has been added so plugins can detect if the plugin is being executed within Matomo for WordPress or Matomo On-Premise
Matomo 3.13.0
New API
- New tracker method
setVisitStandardLengthwhich lets you configure a custom visit standard length in case a custom "visit_standard_length" is configured in the config. Setting only applies when heart beat is enabled. - Added new event
Metrics.isLowerValueBetterso plugins can define if lower metric values are better for additional metrics.
Other Changes
- User ID is no longer linked to visitor ID. Actions with different user IDs will still be considered as part of different visits, irrespective of their visitor IDs, but the same visitor ID can be used with different user IDs.
Matomo 3.12.0
New API
- Added new event
Visualization.beforeRender, triggered after immediately before rendering a visualization. - Added new event
Http.sendHttpRequestandHttp.sendHttpRequest.endso plugins can listen to external HTTP requests, monitor them, or resolve the request themselves. - Added new event
CliMulti.supportsAsyncso plugins can force or disable the usage of archiving through the CLI
Matomo 3.10.0
Breaking Changes
- When giving a user superuser access through the
UsersManager.setSuperUserAccessAPI, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request. - Website referrer URLs are now detected using domain only instead of domain and path. This means if you have two different websites on the same domain, but different paths, and a visitor visits from one to the other, it won't have a referrer website set.
- Custom Dimensions values set with
setCustomDimensionare now URL encoded (they previously weren't). If you were manually URL encoding the custom dimension values before callingsetCustomDimension, your custom dimension values appearing in reports and Visits log/Visitor profile may now be double URL encoded. To solve the double encoding issue, you can remove your URL encoding and trust that Matomo JavaScript Tracker will URL encode the values correctly.
New APIs
- A new tracker method
pinghas been added to send a ping request manually instead of using the heart beat timer. - Added new event
ViewDataTable.configure.end, triggered after view configuration properties have been overwritten by saved settings and query parameters.
Matomo 3.9.0
Breaking Changes
Referrers.getKeywordsForPageUrlandReferrers.getKeywordsForPageTitleAPIs have been deprecated and will be removed in Matomo 4.0.0- By default, Matomo application logs will now be logged in
tmp/logs/matomo.loginstead oftmp/logs/piwik.log. This log file path can be edited in your config/config.ini.php in the INI settinglogger_file_path.
New Features
- It is now possible to locate plugins in a custom directory by setting an environment variable
MATOMO_PLUGIN_DIRSor a$GLOBALS['MATOMO_PLUGIN_DIRS']variable in$MATOMO_ROOT/bootstrap.php. - It is now possible to use monolog's FingersCrossedHandler which buffers all logs and logs all of them in case of warning or error.
New APIs
- New API methods
Piwik\Plugin\Manager::getPluginsDirectories()andPiwik\Plugin\Manager::getPluginDirectory($pluginName)have been added as it is now possible to locate Matomo plugins in different directories and it should be no longer assumed a plugin is located in the "/plugins" directory. - A new tracker method
disableQueueRequesthas been added to disable queued requests which may be useful when logs are imported. - The event
LanguageManager.getAvailableLanguageshas been deprecated. UseLanguagesManager.getAvailableLanguagesinstead.
Matomo 3.8.0
Breaking Changes
- When changing the email address or the password through the
UsersManager.updateUserAPI, a new parameterpasswordConfirmationneeds to be sent along with the request containing the current password of the user issuing the API request. - The output type "save on disk" in the API method
ScheduledReport.generateReporthas been replaced by the download output type. - The method
Piwik\Piwik::doAsSuperUserhas been deprecated and will be removed in Matomo 4. UsePiwik\Access::doAsSuperUserinstead.
New APIs
- It is now possible to queue a request on the JavaScript tracker using the method
queueRequest(requestUrl). This can be useful to group multiple tracking requests into one bulk request to reduce the number of tracking requests that are sent to your server making the tracking more efficient. - When specifying a callback in the JavaScript tracker in a tracker method, we now make sure to execute the callback even in error cases or when sentBeacon is used. The callback receives an event parameter to determine which request was sent and whether the request was sent successfully.
- Added new event
Metrics.getEvolutionUnitwhich lets you set the unit for a metric used in evolution charts and row evolution.
New Features
- The log importer now supports the
--tracker-endpoint-pathparameter which allows you to use a different tracker endpoint than/piwik.php, if desired. - It is now possible to define different log levels for different log writers via INI config. Set log_level_file, for example, to set the log level for the file writer, or log_level_screen for the screen writer.
Internal change
- New Matomo installation will now use by default "matomo.js" and "matomo.php" as tracking endpoints. From Matomo 4.0 all installations will use "matomo.js" and "matomo.php" by default. We recommend you ensure those files can be accessed through the web and are not blocked.
Deprecations
- The method
Piwik\SettingsPiwik::isPiwikInstalled()has been deprecated and renamed toisMatomoInstalled(). It is still supported to use the method, but the method will be removed in Piwik 4.0.0
Matomo 3.6.1
New APIs
- Added new event
Access.modifyUserAccesswhich lets plugins modify current user's access levels/permissions. - Added new event
CustomMatomoJs.manipulateJsTrackerwhich lets plugins modify the JavaScript tracker.
New Developer Features
- Logging to a file can now be easily enabled during tests. A new
[tests] enable_loggingINI option has been added, which you can set to1to enable logging for all tests. Thetests:runandtests:run-uicommands now both have an--enable-loggingoption to enable logging for a specific run.
Matomo 3.6.0
New Features
- A new role has introduced called "write" which has less permissions than an admin but more than a view only user (see FAQ).
- Custom currencies can now be added using the
currencies[]configuration key. - A new segment
eventValuelets you select all users who tracked a custom event with a given value or range of values.
New config.ini.php settings
archiving_profile = 0, if set to 1, core:archive profiling information will be recorded in a log file. the log file is determined by thearchive_profiling_logoption.archive_profiling_log =, if set to an absolute path, core:archive profiling information will be logged to specified file.enable_internet_features=0will now fully disable Internet access by preventing all outgoing connections. Note: changing this setting is not recommended for security, because you will lose the easy auto-update and email notifications.login_whitelist_ip[]now supports hostnames so you can whitelist your IP addresses and/or Hostnames and keep your Matomo secure.
Updated commands
- New parameter
--concurrent-archiversto define the number of maximum archivers to run in parallel on this server. Useful to prevent archiving processes piling up and ultimately failing.
New APIs
- Added new event
API.addGlossaryItemswhich lets you add items to the glossary. - Added new event
Tracker.detectReferrerSocialNetworkwhich lets you add custom social network detections - Added new event
Report.unsubscribewhich is triggered whenever someone unsubscribe from a report - Added new API method
UsersManager.getAvailableRolesto fetch a list of all available roles that can be granted to a user. - Added new API method
UsersManager.getAvailableCapabilitiesto fetch a list of all available capabilities that can be granted to a user. - Added new API method
UsersManager.addCapabilitiesto grant one or multiple capabilities to a user. - Added new API method
UsersManager.removeCapabilitiesto remove one or multiple capabilities from a user. - The API method
UsersManager.setUserAccessnow accepts an array to pass a role and multiple capabilities at once. - Plugin classes can overwrite the method
requiresInternetConnectionto define if they should be automatically unloaded if no internet connection is available (enable_internet_features = 0) - Added two new methods to the JS tracker:
removeEcommerceItemandclearEcommerceCartto allow better control over what is in the ecommerce cart. - Tracking API requests now include
&consent=1in the Tracking API URL When consent has been given by a user.
Breaking Changes
- Changed some menu items to use translation keys instead (see PR #12885).
- The methods
assertResponseCode()andassertHttpResponseText()inPiwik\Tests\Framework\TestCase\SystemTestCasehave been deprecated and will be removed in Matomo 4.0. Please usePiwik\Httpinstead. - The classes
PHPUnit\Framework\Constraint\HttpResponseTextandPHPUnit\Framework\Constraint\ResponseCodehave been deprecated and will be removed in Matomo 4.0. Please usePiwik\Httpinstead. - Creating links through the Proxy has been deprecated. Use rel="nofollow" instead.
- The console option
--piwik-domainhas been deprecated and will be removed in Matomo 4.0. Use--matomo-domaininstead - Social networks are now detected as new referrer type (ID=7), which allows improved reports and better segmentation
- New settings form field UI component "Field Array" that lets users enter multiple values for one setting as a flat array
Matomo 3.5.1
New APIs
- Added new method
Piwik\API\Request::isRootRequestApiRequest()to detect if the root request is an API request.
Matomo 3.5.0
Breaking Changes
- Flattened action url reports now always include a leading
/and will no longer include thedefault_action_name. e.g.path/to/indexwill now be/path/to/. This might affect configured custom alerts, as this plugin uses the flattened url reports for comparison.
New APIs
- New JavaScript tracker functions to ask for consent:
requireConsent,rememberConsentGiven,setConsentGiven,forgetConsentGiven.
New Features
- New events
PrivacyManager.deleteLogsOlderThan,PrivacyManager.exportDataSubjectsandPrivacyManager.deleteDataSubjectsto enable plugins to be GDPR compliant. - New event
AssetManager.addStylesheetsto add additional less styles which are not located in a file. - New event
Archiving.getIdSitesToMarkArchivesAsInvalidatedthat lets plugins customize the behaviour of report invalidations. - Reports and visualizations can now disable the 'all' rows limit selector:
$view->config->disable_all_rows_filter_limit. - New settings form field UI component "Multi Tuple" that lets users enter multiple values for one setting
Matomo 3.4.0
Breaking Changes
piwik font is deprecated and will be removed in Matomo 4.0. Please use new matomo font instead
Sending synchronous requests using ajaxHelper is now deprecated. All requests will be send async as of Matomo 4.0
New APIs
- A new JavaScript tracker method
resetUserIdhas been added to allow clearing user and visitor id. - A new event
Actions.addActionTypeshas been added, to allow plugins to add their custom action types. - Dashboard API has been extended by the methods
copyDashboardToUser,createNewDashboardForUser,removeDashboardandresetDashboardLayout- It is also now possible to delete the first dashboard for a user for automation purposes. Doing so and not adding a new first dashboard might result in buggy UX.
getDashboardsAPI method has been extended by additional parameters to fetch dashboards for specific user
- A new event
API.Request.intercepthas been added which allows plugins to intercept API requests to perform custom logic, overriding the original API method. - A new event
Request.shouldDisablePostProcessinghas been added which allows plugins to disable DataTable post processing for individual API requests. - A new event
SitesManager.shouldPerformEmptySiteCheckhas been added to allow plugins to disable the empty site check for individual sites. - A new JavaScript tracker method
getCrossDomainLinkingUrlParameterhas been added so you can add cross domain tracking capability to dynamically created links. Learn here how to append the result to said links' URLs, see the section "Advanced: Handling Dynamically Generated Links"
Matomo 3.3.0
Piwik is now Matomo. Read more about this change in the official announcement.
New APIs
- New HTTP API
API.getMatomoVersionwas introduced. The previous HTTP APIAPI.getPiwikVersionwill still work but will now be hidden from the API reference page.
Piwik 3.2.2
Breaking Changes
- The
historyServicealong withbroadcast.init,broadcast.propagateAjax,broadcast.pageLoadhave been deprecated and will be removed in Piwik 4.
Piwik 3.2.1
New APIs
New Features
- Themes can now customize the header text color using
@theme-color-header-text - New event
Widgetize.shouldEmbedIframeEmptyadded so plugins can optionally define the output of the widgetized HTML themselves - New events added to add and filter visitor details:
Live.addProfileSummariesandLive.filterProfileSummaries - New JavaScript method
piwikHelper.registerShortcutallows plugins to bind keyboard shortcuts. A summary for available shortcuts will be shown by pressing?
Piwik 3.2.0
New Segments
- New Segment added:
visitStartServerMinutefor Server time - minute (Start of visit) - New Segment added:
visitEndServerMinutefor Server time - minute (End of visit) - New events added to add and filter visitor details:
Live.addVisitorDetailsandLive.filterVisitorDetails
New APIs
- Reports and visualizations can now hide the export icons with a new property
$view->config->show_export. - Reports and visualizations can now show a message above the report with a new property
$view->config->show_header_message. - The following events have been added:
Metric.addMetricsTriggered to add new metrics that cannot be picked up automatically by the platform.Metric.addComputedMetricsTriggered to add computed metrics that are not generated automaticallyMetric.filterMetricsTriggered to filter metrics
- The following new API classes have been added:
Piwik\Columns\MetricsListHolds a list of all available metricsPiwik\Columns\ComputedMetricFactoryCan be used to create computed metricsPiwik\Columns\DimensionMetricFactoryCan be used to create metrics directly within a dimension
New Features
- New config.ini.php setting
show_update_notification_to_superusers_onlymakes it possible to hide update notifications for all users except of superusers
Piwik 3.1.0
Breaking Changes
- The event
Live.getAllVisitorDetailshas been deprecated and will be removed in Piwik 4. Use aVisitorDetailsclass instead (see Live plugin).
New Features
- New method
setSecureCookiethat sets the cookie's secure parameter
New APIs
- The events
ScheduledTasks.shouldExecuteTask,ScheduledTasks.execute,ScheduledTasks.execute.endhave been added to customize the behaviour of scheduled tasks. - A new event
CustomPiwikJs.shouldAddTrackerFilehas been added to let plugins customize which tracker files should be included in piwik.js JavaScript tracker - A new event
Login.authenticate.successfulhas been added, which is triggered when a user successful signs in - A new API class
Piwik\Plugins\CustomPiwikJs\TrackerUpdaterhas been added to update the piwik.js JavaScript tracker
New commands
- The commands
plugin:activateandplugin:deactivatecan now activate and deactivate multiple plugins at once
Piwik 3.0.4
New APIs
- A new event
Db.getActionReferenceColumnsByTablehas been added in case a plugin defines a custom log table which references data to the log_action table - The event
System.addSystemSummaryItemsandSystem.filterSystemSummaryItemshave been added so plugins can add items and filter items of the system summary widget - A new JavaScript tracker method
getPiwikUrlhas been added to retrieve the URL of where the Piwik instance is located - A new JavaScript tracker method
getCurrentUrlhas been added to retrieve the current URL of the website. - A new JavaScript tracker method
getNumTrackedPageViewshas been added to retrieve the number of tracked page views within the currently loaded page or web application. - New JavaScript tracker methods
setSessionCookie,getCookie,hasCookies,getCookieDomain,getCookiePath, andgetSessionCookieTimeouthave been added for better cookie support in plugins. emailandurlform fields can now be used in settings.
Piwik 3.0.3
Breaking Changes
- New config setting
enable_plugin_uploadlets you enable uploading and installing a Piwik plugin ZIP file by a Super User. This used to be enabled by default, but it is now disabled by default now for security reasons. - New Report class property
Report::$supportsFlattenlets you define if a report supports flattening (defaults totrue). If set tofalseit will also setViewDataTable\Config::$show_flatten_tabletofalse
New APIs
- A new event
Controller.triggerAdminNotificationshas been added to let plugins know when they are supposed to trigger notifications in the admin.
Library updates
- pChart library has been removed in favor of CpChart, a pChart fork with composer support and PSR standards.
Piwik 3.0.2
New Features
- A new SMS provider for sms reports has been added: ASPSMS.com
New APIs
- The JavaScript Tracker now supports CrossDomain tracking. The following tracker methods were added for this:
enableCrossDomainLinking,disableCrossDomainLinking,isCrossDomainLinkingEnabled - Added JavaScript Tracker method
getLinkTrackingTimerto get the value of the configured link tracking time - Added JavaScript Tracker method
deleteCustomVariablesto delete all custom variables within a certain scope - The method
enableLinkTrackingcan now be called several times to make Piwik aware of newly added links when your DOM changes - Added a new method
Piwik\Plugin\Report::getMetricNamesToProcessReportTotals()that lets you define which metrics should show percentages in the table report visualization on hover. If defined, these percentages will be automatically calculated. - The event
Tracker.newConversionInformationnow posts a new fourth parameter$action - New HTTP API method
UserCountry.getCountryCodeMappingto get a list of used country codes to country names
Changes
- SMS provider now can define their credential fields by overwriting
getCredentialFields(). This allows to have SMS providers that require more than only an API key. - Therefore the MobileMessaging API method
setSMSAPICredential()now takes the second parameter as an array filled with credentials (instead of a string containing an API key)
Piwik 3.0.1
New APIs
- Live API responses now return a new field ‘generationTimeMilliseconds’ (the generation time for this page, in milliseconds) which is internally used to process the Average generation time in the Visitor Profile
- Added new event
MultiSites.filterRowsForTotalsCalculationto filter which sites will be included in the All Websites Dashboard totals calculation. - The method
Piwik\Plugin\Archiver::shouldRunEvenWhenNoVisits()has been added. By overwriting this method and returning true, a plugin archiver can force the archiving to run even when there was no visit for the website/date/period/segment combination (by default, archivers are skipped when there is no visit).
Piwik 3.0.0
New guide
Read more about migrating a plugin from Piwik 2.X to Piwik 3 in our Migration guide.
Breaking Changes
- When using the Piwik JavaScript Tracking via
_paq.push, it is now required to configure the tracker (eg callingsetSiteIdandsetTrackerUrl) before thepiwik.jsJavaScript tracker is loaded to ensure the tracker works correctly. If the tracker is not initialised correctly, the browser console will display the error "_paq.push() was used but Piwik tracker was not initialized before the piwik.js file was loaded. [...]" - The UserManager API methods do no longer return any
token_authproperties when requesting a user - The menu classes
Piwik\Menu\MenuReportingandPiwik\Menu\MenuMainhave been removed - The class
Piwik\Plugin\Widgetshas been removed and replaced byPiwik\Widget\Widget. For each widget one class is needed from now on. You can generate a widget via./console generate:widget. - The class
Piwik\WidgetListclass has been moved toPiwik\Widget\WidgetsList. - The method
Piwik\Plugins\API\API::getLastDate()has been removed. - The method
Piwik\Archive::getDataTableFromArchive()has been removed, usePiwik\Archive::createDataTableFromArchiveinstead. - The method
Piwik\Plugin\Menu::configureReportingMenuhas been removed. To add something to the reporting menu you need to create widgets - The method
Report::configureWidget(),Report::getWidgetTitle()andReport::configureReportingMenu()have been removed, use the new methodReport::configureWidgets()instead. - The method
Report::getCategory()has been moved toReport::getCategoryId()and does no longer return the translated category but the translation key of the category. - The property
Report::$categoryhas been renamed toReport::$categoryId - The methods
Report::factory(),Report::getAllReportClasses(),Report::getAllReportshave been moved to thePiwik\Plugin\Reportsclass. - The properties
Report::$widgetTitle,Report::$widgetParamsandReport::$menuTitlewere removed, use the methodReport::configureWidgets()to create widgets instead - In the HTTP API methods
Dashboard.getDefaultDashboardandDashboard.getUserDashboardswe do no longer remove not existing widgets as it is up to the client which widgets actually exist - The method
Piwik\Plugin\Controller::getEvolutionHtmlhas been removed without a replacement as it should be no longer needed. The evolution is generated by ViewDataTables directly - The
core:pluginconsole command has been removed in favor of the newplugin:list,plugin:activateandplugin:deactivatecommands as announced in Piwik 2.11 - The visibility of private properties and methods in
Piwik\Plugins\Login\Controllerwere changed toprotected - Controller actions are now case sensitive. This means the URL and events have to use the same case as the name of the action defined in a controller.
- When calling the HTTP Reporting API, a default filter limit of 100 is now always applied. The default filter limit used to be not applied to API calls that do not return reports, such as when requesting sites, users or goals information.
- The "User Menu" was removed and should be replaced by "Admin Menu". Change
configureUserMenu(MenuUser $menu)toconfigureAdminMenu(MenuAdmin $menu)in yourMenu.php. - The method
Piwik\Menu\MenuAbstract::add()has been removed, usePiwik\Menu\MenuAbstract::addItem()instead - The method
Piwik\Menu\MenuAdmin::addSettingsItem()was removed, usePiwik\Menu\MenuAdmin::addSystemItem()instead. - A new method
Piwik\Menu\MenuAdmin::addMeasurablesItem()was added. - The class
Piwik\Plugin\Settingshas been split toPiwik\Settings\Plugin\SystemSettingsandPiwik\Settings\Plugin\UserSettings. - The creation of settings has slightly changed to improve performance. It is now possible to create new settings via the method
$this->makeSetting()seePiwik\Plugins\ExampleSettingsPlugin\SystemSettingsfor an example. - It is no longer possible to define an introduction text for settings.
- If requesting multiple periods for one report, the keys that define the range are no longer translated. For example before 3.0 an API response may contain:
<result date="From 2010-02-01 to 2010-02-07">which is now<result date="2010-02-01,2010-02-07">. - The following deprecated events have been removed as mentioned.
Tracker.existingVisitInformationUse dimensions instead of usingTrackerevents.Tracker.newVisitorInformationTracker.recordActionTracker.recordEcommerceGoalTracker.recordStandardGoalsAPI.getSegmentDimensionMetadataDefine segments in Dimension insteadMenu.Admin.addItemsCreate a Menu instead of usingMenueventsMenu.Reporting.addItemsMenu.Top.addItemsViewDataTable.addViewDataTableCreate a Visualization insteadViewDataTable.getDefaultTypeSpecify the default type in a Report insteadLogin.authenticateCreate a custom SessionInitializer instead of usingLogineventsLogin.initSession.endLogin.authenticate.successful- When posting one of the events
API.Request.dispatch,API.Request.dispatch.end,API.$plugin.$apiAction, orAPI.$plugin.$apiAction.endthe$finalParametersparameter is indexed in Piwik 2 (egarray(1, 6)), and named in Piwik 3 (egarray('idSite' => 1, 'idGoal' => 6)) - Widgets using the already removed
UserSettingsplugin won't work any longer. Please update the module and action parameter in the widget url according to the following listold module old action new module new action UserSettings getPlugin DevicePlugins getPlugin UserSettings index DevicesDetection software UserSettings getBrowser DevicesDetection getBrowsers UserSettings getBrowserVersions DevicesDetection getBrowserVersions UserSettings getMobileVsDesktop DevicesDetection getType UserSettings getOS DevicesDetection getOsVersions UserSettings getOSFamily DevicesDetection getOsFamilies UserSettings getBrowserType DevicesDetection getBrowserEngines UserSettings getResolution Resolution getResolution UserSettings getConfiguration Resolution getConfiguration UserSettings getLanguage UserLanguage getLanguage UserSettings getLanguageCode UserLanguage getLanguageCode
Read more about migrating a plugin from Piwik 2.X to Piwik 3 on our Migration guide.
Deprecations
- The method
Piwik\Updates::getMigrationQueries()has been deprecated and renamed togetMigrations(). It is still supported to use the method, but the method will be removed in Piwik 4.0.0 - The method
Piwik\Updater::executeMigrationQueries()has been deprecated and renamed toexecuteMigrations. It is still supported to use the method, but the method will be removed in Piwik 4.0.0.
New APIs
- Multiple widgets for one report can now be created via the
Report::configureWidgets()method via the new classesPiwik\Widget\ReportWidgetFactoryandPiwik\Widget\ReportWidgetConfig - There is a new property
Report::$subCategorythat lets you add a report to the reporting UI. If a page having that name does not exist yet, it will be created automatically. The newly added methodReport::getSubCategory()lets you get this value. - The new classes
Piwik\Widget\Widget,Piwik\Widget\WidgetConfigandPiwik\Widget\WidgetContainerConfiglets you create a new widget. - The new class
Piwik\Category\Subcategorylet you change the name and order of menu items - New HTTP API method
API.getWidgetMetadatato get a list of available widgets - New HTTP API method
API.getReportPagesMetadatato get a list of all available pages that exist including the widgets they include - New HTTP API method
SitesManager.getSiteSettingsto get a list of all available settings for a specific site - The JavaScript AjaxHelper has a new method
ajaxHelper.withTokenInUrl()to easily send a token along a XHR. Within the Controller the existence of this token can be checked via$this->checkTokenInUrl();to prevent CSRF attacks. - The new class
Piwik\Updater\Migration\Factorylets you easily create migrations that can be executed during an update. For example database or plugin related migrations. To generate a new update with migrations execute./console generate:update. - The new method
Piwik\Updater::executeMigrationlets you execute a single migration. - The new method
Piwik\Segment::willBeArchivedlets you detect whether a segment will be archived or not. - The following events have been added:
ViewDataTable.filterViewDataTablelets you filter available visualizationsDimension.addDimensionlets you add custom dimensionsDimension.filterDimensionlets you filter any dimensionsReport.addReportslets you add dynamically created reportsReport.filterReportslets you filter any reportUpdater.componentUpdatedtriggered after core or a plugin has been updatedPluginManager.pluginInstalledtriggered after a plugin was installedPluginManager.pluginUninstalledtriggered after a plugin was uninstalledUpdater.componentInstalledtriggered after a component was installedUpdater.componentUninstalledtriggered after a component was uninstalled- New HTTP Tracking API parameter
pv_idwhich accepts a six character unique ID that identifies which actions were performed on a specific page view. Read more about it in the HTTP Tracking API; - New event
Segment.addSegmentsthat lets you add segments. - New Piwik JavaScript Tracker method
disableHeartBeatTimer()to disable the heartbeat timer if it was previously enabled. - The
SitesManager.getJavascriptTaghas a new optiongetJavascriptTagto enable the tracking of users that have JavaScript disabled
Changes
- New now accept tracking requests for up to 1 day in the past instead of only 4 hours
- If a tracking request has a custom timestamp that is older than one day and the tracking request is not authenticated, we ignore the whole tracking request instead of ignoring the custom timestamp and still tracking the request with the current timestamp
New features
- Piwik JavaScript Tracking API: we now attempt to track Downloads and Outlinks when the user uses the mouse middle click or the mouse right right click. Previously only left clicks on Downloads and Outlinks were measured.
- New "Sparklines" visualization that lets you create a widget showing multiple sparklines.
- New config.ini.php setting:
tracking_requests_require_authentication_when_custom_timestamp_newer_thanto change how far back Piwik will track your requests without authentication. By default, value is set to 86400 (one day). The configured value is in seconds.
Library updates
- Updated AngularJS from 1.2.28 to 1.4.3
- Updated several backend libraries to their latest version: doctrine/cache, php-di.
Internal change
- Support for IE8 was dropped. This affects only the Piwik UI, not the Piwik.js Tracker.
- Required PHP version was increased from 5.3 to 5.5.9
- We have updated PhantomJS 1.9 to 2.1.1 for our UI screenshot tests.
Piwik 2.16.3
New APIs
- The Piwik JavaScript tracker has a new method
trackRequestthat allows you to send any tracking parameters to Piwik. For example_paq.push(['trackRequest', 'te=foo&bar=baz'])
Internal Changes
- Expected screenshots for UI tests are now stored using Git LFS instead of a submodule. Running, creating or updating UI tests will require Git LFS to be installed.
The folder containing expected screenshots was renamed from
expected-ui-screenshotstoexpected-screenshots. The UI-Test-Runner is now able to handle both names.
Piwik 2.16.2
New APIs
- Multiple JavaScript trackers can now be created easily via
_paq.push(['addTracker', piwikUrl, piwikSiteId]). All tracking requests will be then sent to all added Piwik trackers. Learn more. - It is possible to get an asynchronously created tracker instance (
addTracker) via the methodPiwik.getAsyncTracker(optionalPiwikUrl, optionalPiwikSiteId). This allows you to get the tracker instance and to send different tracking requests to this Piwik instance and to configure it differently than other tracker instances. - Added a new API method
Goals.getGoal($idSite, $idGoal)to fetch a single goal.
Internal change
- Piwik is now compatible with PHP7.
piwik.js, if you call the methodsetDomainsnote that that the behavior has slightly changed. The current page domain (hostname) will now be added automatically if none of the given host alias passed as a parameter tosetDomainscontain a path and if no host alias is already given for the current host alias. Say you are on "example.org" and sethostAlias = ['example.com', 'example.org/test']then the current "example.org" domain will not be added as there is already a more restrictive hostAlias 'example.org/test' given. We also do not add the current page domain (hostname) automatically if there was any other host specifying any path such as['example.com', 'example2.com/test']. In this case we also do not add the current page domain "example.org" automatically as the "path" feature is used. As soon as someone uses the path feature, for Piwik JS Tracker to work correctly in all cases, one needs to specify all hosts manually. Learn more.piwik.js: after an ecommerce order is tracked usingtrackEcommerceOrder, the items in the cart will now be removed from the JavaScript object. CallingtrackEcommerceCartUpdatewill not remove the items in the cart.
Piwik 2.16.1
New features
- New method
setIsWritableByCurrentUserforSystemSettingto change the writable permission for certain system settings via DI. - JS Tracker:
setDomainsfunction now supports page wildcards matching eg.example.com/index*which can be useful when tracking a group of pages within a domain in a separate website in Piwik - To customise the list of URL query parameters to be removed from your URLs, you can now define and overwrite
url_query_parameter_to_exclude_from_urlINI setting in yourconfig.ini.phpfile. By default, the following query string parameters will be removed:gclid, fb_xd_fragment, fb_comment_id, phpsessid, jsessionid, sessionid, aspsessionid, doing_wp_cron, sid.
Deprecations
- The following PHP functions have been deprecated and will be removed in Piwik 3.0:
SettingsServer::isApache()
New guides
- JavaScript Tracker: Measuring domains and/or sub-domains
Breaking Changes
- Reporting API: when a cell value in a CSV or TSV (excel) data export starts with a character
=,-or+, Piwik will now prefix the value with'to ensure that it is displayed correctly in Excel or OpenOffice/LibreOffice.
Internal change
- Tracking API: by default, when tracking a Page URL, Piwik will now remove the URL query string parameter
sidif it is found. - In the JavaScript tracker, the function
setDomainswill not anymore attempt to set a cookie path. Learn more about configuring the tracker correctly when tracking one or several domains and/or paths.
Piwik 2.16.1
Internal change
- The setting
[General]enable_marketplace=0/1was removed, instead the new plugin Marketplace can be disabled/enabled. The updater should automatically migrate an existing setting.
Piwik 2.16.0
New features
- New segment
actionTypelets you segment all actions of a given type, eg.actionType==eventsoractionType==downloads. Action types values are:pageviews,contents,sitesearches,events,outlinks,downloads - New segment
actionUrllets you segment any action that matches a given URL, whether they are Pageviews, Site searches, Contents, Downloads or Events. - New segment
deviceBrandlets you restrict your users to those using a particular device brand such as Apple, Samsung, LG, Google, Nokia, Sony, Lenovo, Alcatel, etc. View the complete list of device brands. - New segment operators
=^"Starts with" and=$"Ends with" complement the existing segment operators: Contains, Does not contain, Equals, Not equals, Greater than or equal to, Less than or equal to. - The JavaScript Tracker method
PiwikTracker.setDomains()can now handle paths. This means when setting eg_paq.push(['setDomains, '*.matomo.org/website1'])all link that goes to the same domainmatomo.orgbut to any other path thanwebsite1/*will be treated as outlink. - In Administration > Websites, for each website, there is a checkbox "Only track visits and actions when the action URL starts with one of the above URLs". In Piwik 2.14.0, any action URL starting with one of the Alias URLs or starting with a subdomain of the Alias URL would be tracked. As of Piwik 2.15.0, when this checkbox is enabled, it may track less data: action URLs on an Alias URL subdomain will not be tracked anymore (you must specify each sub-domain as Alias URL).
- It is now possible to pass an option
php-cli-optionsto thecore:archivecommand. The given cli options will be forwarded to the actual PHP command. This allows to for example specify a different memory limit for the archiving process like this:./console core:archive --php-cli-options="-d memory_limit=8G" - New less variable
@theme-color-menu-contrast-textSelectedthat lets you specify the color of a selected menu item. - in Administration > Diagnostics, there is a new page
Config filewhich lets Super User view all config values fromglobal.ini.phpin the UI, and whether they were overridden in yourconfig/config.ini.php
New commands
- New command
config:setlets you set INI config options from the command line. This command can be used for convenience or for automation.
Internal changes
UsersManager.*API calls: when an API request specifies atoken_authof a user withadminpermission, the returned dataset will not include all usernames as previously, API will now only return usernames for users withvieworadminpermission to website(s) viewable by thistoken_auth.- When generating a new plugin skeleton via
generate:plugincommand, plugin name must now contain only letters and numbers. - JavaScript Tracker tests no longer require
SQLite. The existing MySQL configuration for tests is used now. In order to run the tests make sure Piwik is installed and[database_tests]is configured inconfig/config.ini.php. - The definitions for search engine and social network detection have been moved from bundled data files to a separate package (see https://github.com/matomo-org/searchengine-and-social-list).
- In UI screenshot tests, a test environment
configOverridesetting should be no longer overwritten. Instead new values should be added to the existingconfigOverridearray in PHP or JavaScript. For example instead oftestEnvironment.configOverride = {group: {name: 1}}usetestEnvironment.overrideConfig('group', 'name', '1').
New APIs
- Add your own SMS/Text provider by creating a new class in the
SMSProviderdirectory of your plugin. The class has to extendPiwik\Plugins\MobileMessaging\SMSProviderand implement the required methods. - Segments can now be composed by a union of multiple segments. To do this set an array of segments that shall be used for that segment
$segment->setUnionOfSegments(array('outlinkUrl', 'downloadUrl'))instead of defining a SQL column.
Deprecations
- The method
DB::tableExistswas un-used and has been removed.
Piwik 2.15.0
New commands
- New command
diagnostics:analyze-archive-tablethat analyzes archive tables - New command
database:optimize-archive-tablesto optimize archive tables and possibly save disk space (even if on InnoDB) - New Command
core:invalidate-report-datato invalidate archive data (w/ period cascading) (FAQ)
New APIs and features
- Piwik 2.15.0 is now mostly compatible with PHP7.
- The JavaScript Tracker
piwik.jsgot a new methodlogAllContentBlocksOnPageto log all found content blocks within a page to the console. This is useful to debug / test content tracking. It can be triggered via_paq.push(['logAllContentBlocksOnPage']) - The Class
Piwik\Plugins\Login\Controlleris now considered a public API. - The new method
Piwik\Menu\MenuAbstract::registerMenuIcon()can be used to define an icon for a menu category to replace the default arrow icon. - New event
CronArchive.getIdSitesNotUsingTrackerthat allows you to set a list of idSites that do not use the Tracker API to make sure we archive these sites if needed. - New events
CronArchive.init.startwhich is triggered when the CLI archiver starts andCronArchive.endwhen the archiver ended. - Piwik tracker can now be configured with strict Content Security Policy (CSP FAQ).
- Super Users can choose whether to use the latest stable release or latest Long Term Support release.
Breaking Changes
- The method
Dimension::getId()has been set asfinal. It is not allowed to overwrite this method. - We fixed a bug where the API method
Sites.getPatternMatchSitesonly returned a very limited number of websites by default. We now return all websites by default unless a limit is specified specifically. - Handling of localized date, time and range formats has been changed. Patterns no longer contain placeholders like %shortDay%, but work with CLDR pattern instead. You can use one of the predefined format constants in Date class for using getLocalized().
- As we are now using CLDR formats for all languages, some time formats were even changed in english. Attributes like prettyDate in API responses might so have been changed slightly.
- The config
enable_measure_piwik_usage_in_idsitewhich is used to track the Piwik usage with Piwik was removed and replaced by a new pluginAnonymousPiwikUsageMeasurement
Deprecations
- The following HTTP API methods have been deprecated and will be removed in Piwik 3.0:
SitesManager.getSitesIdWithVisitsAPI.getLastDate- The following events have been deprecated and will be removed in Piwik 3.0. Use dimensions instead.
Tracker.existingVisitInformationTracker.getVisitFieldsToPersistTracker.newConversionInformationTracker.newVisitorInformationTracker.recordActionTracker.recordEcommerceGoalTracker.recordStandardGoals- The Platform API method
\Piwik\Plugin::getListHooksRegistered()has been deprecated and will be removed in Piwik 4.0. Use\Piwik\Plugin::registerEvents()instead.
Internal changes
- When logging in, the username is now case insensitive
- URLs with emojis and any other unicode character will be tracked, with special characters replaced with
<EFBFBD> - A permanent warning notification is now displayed when PHP is 5.4.* or older, since it has reached End Of Life
- In
piwik.jswe replaced JSON2 with JSON3 to implement CSP (Content Security Policy) as JSON3 does not useeval(). JSON3 will be used if a browser does not provide a native JSON API. We are usingJSON3in a way that it will not conflict if your website is usingJSON3as well. - The option
branchof the console commanddevelopment:sync-system-test-processedwas removed as it is no longer needed. - All numbers in reports will now appear formatted (eg.
1,000,000instead of1000000) - Database connections now use
UTF-8charset explicitly to force UTF-8 data handling
Piwik 2.14.0
Breaking Changes
- The
UserSettingsAPI has been removed. The API was deprecated in earlier versions. UseDevicesDetection,ResolutionandDevicePluginsAPI instead. - Many translations have been moved to the new Intl plugin. Most of them will still work, but please update their usage. See https://github.com/matomo-org/matomo/pull/8101 for a full list
New features
- The JavaScript Tracker does now track outlinks and downloads if a user opens the context menu if the
enabledparameter of theenableLinkTracking()method is set totrue. To use this new feature usetracker.enableLinkTracking(true)or_paq.push(['enableLinkTracking', true]);. This is not industry standard and is vulnerable to false positives since not every user will select "Open in a new tab" when the context menu is shown. Most users will do though and it will lead to more accurate results in most cases. - The JavaScript Tracker now contains the 'heart beat' feature which can be used to obtain more accurate visit lengths by periodically sending 'ping' requests to Piwik. To use this feature use
tracker.enableHeartBeatTimer();or_paq.push(['enableHeartBeatTimer']);. By default, a ping request will be sent every 15 seconds. You can specify a custom ping delay (in seconds) by passing an argument, eg,tracker.enableHeartBeatTimer(10);or_paq.push(['enableHeartBeatTimer', 10]);. - New custom segment
languageCodethat lets you segment visitors that are using a particular language. Example values:de,fr,en-gb,zh-cn, etc. - Segment
userIdnow supports any segment operator (previously only operator Contains=@was supported for this segment).
Commands updates
- The command
core:archivenow has two new parameter:--force-idsegmentsand--skip-idsegmentsthat let you force (or skip) processing archives for one or several custom segments. - The command
scheduled-tasks:runnow has an argumenttaskthat lets you force run a particular scheduled task.
Library updates
- Updated pChart library from 2.1.3 to 2.1.4. The files were moved from the directory
libs/pChart2.1.3tolibs/pChart
Internal change
- To execute UI tests "ImageMagick" is now required.
- The Q JavaScript promise library is now distributed with tests and can be used in the piwik.js tests.
Piwik 2.13.0
Breaking Changes
- The API method
Live.getLastVisitsDetailsdoes no longer support the API parameterfilter_sort_columnto prevent possible memory issues whenfilter_offsetis large. - The Event
Site.setSitewas removed as it causes performance problems. piwik.phpdoes now return a HTTP 400 (Bad request) if requested without any tracking parameters (GET/POST). If you still want to usepiwik.phpfor checks please usepiwik.php?rec=0.
Deprecations
- The method
Piwik\Archive::getBlob()has been deprecated and will be removed from June 1st 2015. Use one of the methodsgetDataTable*()methods instead. - The API parameter
countVisitorsToFetchof the API methodLive.getLastVisitsDetailshas been deprecated asfilter_offsetandfilter_limitwork correctly now.
New commands
- There is now a
diagnostic:runcommand to run the system check from the command line. - There is now an option
--xhprofthat can be used with any command to profile that command via XHProf.
APIs Improvements
- Visitor details now additionally contain:
deviceTypeIcon,deviceBrandanddeviceModel - In 2.6.0 we added the possibility to use
filter_limitandfilter_offsetif an API returns an indexed array. This was not working in all cases and is fixed now. - The API parameter
filter_patternandfilter_offset[]can now be used if an API returns an indexed array.
Internal changes
- The referrer spam filter has moved from the
referrer_urls_spamINI option (inglobal.ini.php) to a separate package (see https://github.com/matomo-org/referrer-spam-list).
Piwik 2.12.0
Breaking Changes
- The deprecated method
Period::factory()has been removed. UsePeriod\Factoryinstead. - The deprecated method
Config::getConfigSuperUserForBackwardCompatibility()has been removed. - The deprecated methods
MenuAdmin::addEntry()andMenuAdmin::removeEntry()have been removed. UsePiwik\Plugin\Menuinstead. - The deprecated methods
MenuTop::addEntry()andMenuTop::removeEntry()have been removed. UsePiwik\Plugin\Menuinstead. - The deprecated method
SettingsPiwik::rewriteTmpPathWithInstanceId()has been removed. - The following deprecated methods from the
Piwik\IPclass have been removed, usePiwik\Network\IPinstead:sanitizeIp()sanitizeIpRange()P2N()N2P()prettyPrint()isIPv4()long2ip()isIPv6()isMappedIPv4()getIPv4FromMappedIPv6()getIpsForRange()isIpInRange()getHostByAddr()
Deprecations
APIclasses should no longer have a protected constructor. Classes with a protected constructor will generate a notice in the logs and should expose a public constructor instead.- Update classes should not declare static
getSql()andupdate()methods anymore. It is still supported to use those, but developers should instead override theUpdates::getMigrationQueries()andUpdates::doUpdate()instance methods.
New features
APIclasses can now use dependency injection in their constructor to inject other instances.
New commands
- There is now a command
core:purge-old-archive-datathat can be used to manually purge temporary, error-ed and invalidated archives from one or more archive tables. - There is now a command
usercountry:attributethat can be used to re-attribute geolocated location data to existing visits and conversions. If you have visits that were tracked before setting up GeoIP, you can use this command to add location data to them.
Piwik 2.11.0
Breaking Changes
- The event
User.getLanguagehas been removed. - The following deprecated event has been removed:
TaskScheduler.getScheduledTasks - Special handling for operating system
Windowshas been removed. Like other operating systems all versions will now only be reported asWindowswith versions likeXP,7,8, etc. - Reporting for operating systems has been adjusted to report information according to browser information. Visitor details now contain:
operatingSystemName,operatingSystemIcon,operatingSystemCodeandoperatingSystemVersion
Deprecations
- The following methods have been deprecated in favor of the new
Piwik\Intlcomponent:Piwik\Common::getContinentsList(): useRegionDataProvider::getContinentList()insteadPiwik\Common::getCountriesList(): useRegionDataProvider::getCountryList()insteadPiwik\Common::getLanguagesList(): useLanguageDataProvider::getLanguageList()insteadPiwik\Common::getLanguageToCountryList(): useLanguageDataProvider::getLanguageToCountryList()insteadPiwik\Metrics\Formatter::getCurrencyList(): useCurrencyDataProvider::getCurrencyList()instead
- The
Piwik\Translateclass has been deprecated in favor ofPiwik\Translation\Translator. - The
core:pluginconsole has been deprecated in favor of the newplugin:list,plugin:activateandplugin:deactivatecommands - The following classes have been deprecated:
Piwik\TaskScheduler: usePiwik\Scheduler\SchedulerinsteadPiwik\ScheduledTask: usePiwik\Scheduler\Taskinstead
- The API method
UserSettings.getLanguageis deprecated and will be removed from May 1st 2015. UseUserLanguage.getLanguageinstead - The API method
UserSettings.getLanguageCodeis deprecated and will be removed from May 1st 2015. UseUserLanguage.getLanguageCodeinstead - The
Piwik\Registryclass has been deprecated in favor of using the container:Registry::get('auth')should be replaced withStaticContainer::get('Piwik\Auth')Registry::set('auth', $auth)should be replaced withStaticContainer::getContainer()->set('Piwik\Auth', $auth)
New features
- You can now generate UI / screenshot tests using the command
generate:test - During UI tests we do now add a CSS class to the HTML element called
uiTest. This allows you do hide content when screenshots are captured.
New commands
- A new command (core:fix-duplicate-log-actions) has been added which can be used to remove duplicate actions and correct references to them in other tables. Duplicates were caused by this bug: #6436
Library updates
- Updated AngularJS from 1.2.26 to 1.2.28
- Updated piwik/device-detector from 2.8 to 3.0
Internal change
- UI specs were moved from
tests/PHPUnit/UItotests/UI. We also moved the UI specs directly into the Piwik repository meaning the piwik-ui-tests repository contains only the expected screenshots from now on. - There is a new command
development:sync-system-test-processedfor core developers that allows you to copy processed test results from travis to your local dev environment.
Piwik 2.10.0
Breaking Changes
- API responses containing visitor information will no longer contain the fields
screenTypeandscreenTypeIconas those reports have been completely removed - os, browser and browser plugin icons are now located in the DevicesDetection and DevicePlugins plugin. If you are not using the Reporting or Metadata API to get the icon locations please update your paths.
- The deprecated method
Piwik\SettingsPiwik::rewriteTmpPathWithHostname()has been removed. - The following events have been removed:
Log.formatFileMessageLog.formatDatabaseMessageLog.formatScreenMessage- These events have been removed as Piwik now uses the Monolog logging library. Learn more.
- The event
Log.getAvailableWritershas been removed: to add custom log backends, you now need to configure Monolog handlers - The INI options
log_only_when_cliandlog_only_when_debug_parameterhave been removed
Library updates
- We added the
symfony/var-dumperlibrary allowing you to better print any arbitrary PHP variable viadump($var1, $var2, ...). - Piwik now uses Monolog as a logger.
- The tracker proxy (previously in
misc/proxy-hide-piwik-url/) has been moved to a separate repository: https://github.com/matomo-org/tracker-proxy.
Deprecations
- 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.
- The API method
UserSettings.getBrowserVersionis deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowserVersionsinstead - The API method
UserSettings.getBrowseris deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowsersinstead - The API method
UserSettings.getOSFamilyis deprecated and will be removed from May 1st 2015. UseDevicesDetection.getOsFamiliesinstead - The API method
UserSettings.getOSis deprecated and will be removed from May 1st 2015. UseDevicesDetection.getOsVersionsinstead - The API method
UserSettings.getMobileVsDesktopis deprecated and will be removed from May 1st 2015. UseDevicesDetection.getTypeinstead - The API method
UserSettings.getBrowserTypeis deprecated and will be removed from May 1st 2015. UseDevicesDetection.getBrowserEnginesinstead - The API method
UserSettings.getResolutionis deprecated and will be removed from May 1st 2015. UseResolution.getResolutioninstead - The API method
UserSettings.getConfigurationis deprecated and will be removed from May 1st 2015. UseResolution.getConfigurationinstead - The API method
UserSettings.getPluginis deprecated and will be removed from May 1st 2015. UseDevicePlugins.getPlugininstead - The API method
UserSettings.getWideScreenhas been removed. UseUserSettings.getScreenTypeinstead. Piwik\SettingsPiwik::rewriteTmpPathWithInstanceId()has been deprecated. Instead of hardcoding thetmp/path everywhere in the codebase and then callingrewriteTmpPathWithInstanceId(), developers should get thepath.tmpconfiguration value from the DI container (e.g.StaticContainer::getContainer()->get('path.tmp')).- The method
Piwik\Log::setLogLevel()has been deprecated - The method
Piwik\Log::getLogLevel()has been deprecated
Piwik 2.9.1
Breaking Changes
- The HTTP Tracker API does now respond with a HTTP 400 instead of a HTTP 500 in case an invalid
idsiteis used
New APIs
- New URL parameter
send_image=0in 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).
New commands
core:plugin listlists all plugins currently activated in Piwik.
Piwik 2.9.0
Breaking Changes
- 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:updatedoes 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--yesoption.
Deprecations
- Most methods of
Piwik\IPhave been deprecated in favor of the new piwik/network component. - The file
tests/PHPUnit/phpunit.xmlis 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
Library updates
- Code for manipulating IP addresses has been moved to a separate standalone component: piwik/network. Backward compatibility is kept in Piwik core.
Piwik 2.8.2
Library updates
- Updated AngularJS from 1.2.25 to 1.2.26
- Updated jQuery from 1.11.0 to 1.11.1
Piwik 2.8.0
Breaking Changes
- 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\Unziphas 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\UncompressInterfacehas been moved and renamed toPiwik\Decompress\DecompressInterface(inside the new repository).
Deprecations
- The
Piwik::setUserHasSuperUserAccessmethod is deprecated, instead use Access::doAsSuperUser. This method will ensure that super user access is properly rescinded after the callback finishes. - The class
\IntegrationTestCaseis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\SystemTestCaseinstead. - The class
\DatabaseTestCaseis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\IntegrationTestCaseinstead. - The class
\BenchmarkTestCaseis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\BenchmarkTestCaseinstead. - The class
\ConsoleCommandTestCaseis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\TestCase\ConsoleCommandTestCaseinstead. - The class
\FakeAccessis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\Mock\FakeAccessinstead. - The class
\Piwik\Tests\Fixtureis deprecated and will be removed from February 6th 2015. Use\Piwik\Tests\Framework\Fixtureinstead. - The class
\Piwik\Tests\OverrideLoginis deprecated and will be removed from February 6ths 2015. Use\Piwik\Framework\Framework\OverrideLogininstead.
New API Features
- The pivotBy and related query parameters can be used to pivot reports by another dimension. Read more about the new query parameters here.
Library updates
- Updated AngularJS from 1.2.13 to 1.2.25
New commands
generate:angular-directivelets you easily generate a template for a new angular directive for any plugin.
Internal change
- 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.
Piwik 2.7.0
Reporting APIs
- Several APIs will now expose a new metric
nb_userswhich 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
Deprecations
- 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.
New APIs
- It is now easier to generate the URL for a menu item see #6140, urlForDefaultAction(), urlForAction(), urlForModuleAction()
New commands
core:clear-cachesLets you easily delete all caches. This command can be useful for instance after updating Piwik files manually.
Piwik 2.6.0
Deprecations
- 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
Reporting API
- If an API returns an indexed array, it is now possible to use
filter_limitandfilter_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
getLastVisitDetailsorgetVisitorProfile. 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.
New commands
core:run-scheduled-taskslets you run all scheduled tasks due to run at this time. Useful for instance when testing tasks.
Internal change
- 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.phpwill no longer exist. In case you are using Piwik from Git make sure to runphp composer.phar self-update && php composer.phar installto make your Piwik work again. Also make sure to no longer includecore/Loader.phpin 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.initAuthenticationObjectevent or it has to define dimensions in order to be detected as a tracker plugin.
Piwik 2.5.0
Breaking Changes
- Javascript Tracking API: if you are using
getCustomVariablefunction to access custom variables values that were set on previous page views, you now must also callstoreCustomVariablesInCookiebefore 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 thetransformproperty like this:$setting->transform = function ($value) { return Common::sanitizeInputValue($value); } - Config setting
disable_merged_assetsmoved fromDebugsection toDevelopment. The updater will automatically change the section for you. API.getRowEvolutionwill 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.getAllreturns 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
Deprecations
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 aVisualizationsdirectory inside the plugin.
New features
Translation search
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.
Reporting API
It is now possible to use the filter_sort_column parameter when requesting Live.getLastVisitDetails. For instance &filter_sort_column=visitCount.
@since annotation
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.
New APIs
- 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 modify 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
New commands
generate:themelets you easily generate a new theme and customize colors, see the Theming guidegenerate:updatelets you generate an update filegenerate:reportlets you generate a reportgenerate:dimensionlets you enhance the tracking by adding new dimensionsgenerate:menulets you generate a menu class to add or modify menu itemsgenerate:widgetslets you generate a widgets class to add or modify widgetsgenerate:taskslets you generate a tasks class to add or modify tasksdevelopment:enablelets 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:disablelets you disable the development mode
Find the general Matomo Changelogs for each release at matomo.org/changelog