diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2015-08-21 10:51:07 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2015-08-21 10:51:07 +0300 |
commit | 28bda49bd83f12210ac0efff01fef25c8fbc5f54 (patch) | |
tree | 356ec1043dfa880870b69d85329b7473f7105853 | |
parent | 32542af56d59abdefe008bafc6561f357a9ccfb0 (diff) | |
parent | b278217e3459818df0fdf524a0dc215e93c555d2 (diff) |
Merge pull request #8500 from piwik/7838
Deprecated some tracker events
-rw-r--r-- | CHANGELOG.md | 11 | ||||
-rw-r--r-- | core/Tracker/Action.php | 3 | ||||
-rw-r--r-- | core/Tracker/GoalManager.php | 9 | ||||
-rw-r--r-- | core/Tracker/Visit.php | 7 | ||||
-rw-r--r-- | core/Tracker/Visitor.php | 2 | ||||
-rw-r--r-- | core/Tracker/VisitorRecognizer.php | 4 |
6 files changed, 35 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b109cee2e2..71867aa9cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' ### Breaking Changes * The method `Dimension::getId()` has been set as `final`. It is not allowed to overwrite this method. +### Deprecations + +* The following events have been deprecated and will be removed in Piwik 3.0. Use [dimensions](http://developer.piwik.org/guides/dimensions) instead. + * `Tracker.existingVisitInformation` + * `Tracker.getVisitFieldsToPersist` + * `Tracker.newConversionInformation` + * `Tracker.newVisitorInformation` + * `Tracker.recordAction` + * `Tracker.recordEcommerceGoal` + * `Tracker.recordStandardGoals` + ### Internal Change * The option `branch` of the console command `development:sync-system-test-processed` was removed as it is no longer needed. diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php index c4c33148a0..b30d695e73 100644 --- a/core/Tracker/Action.php +++ b/core/Tracker/Action.php @@ -399,9 +399,12 @@ abstract class Action /** * Triggered after successfully persisting a [visit action entity](/guides/persistence-and-the-mysql-backend#visit-actions). * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param Action $tracker Action The Action tracker instance. * @param array $visitAction The visit action entity that was persisted. Read * [this](/guides/persistence-and-the-mysql-backend#visit-actions) to see what it contains. + * @deprecated */ Piwik::postEvent('Tracker.recordAction', array($trackerAction = $this, $visitAction)); } diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index 3c9cd0bcf2..7bd5e97f1e 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -331,10 +331,13 @@ class GoalManager * _Note: Subscribers should be wary of doing any expensive computation here as it may slow * the tracker down._ * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param array $conversion The conversion entity that was just persisted. See what information * it contains [here](/guides/persistence-and-the-mysql-backend#conversions). * @param array $visitInformation The visit entity that we are tracking a conversion for. See what * information it contains [here](/guides/persistence-and-the-mysql-backend#visits). + * @deprecated */ Piwik::postEvent('Tracker.recordEcommerceGoal', array($conversion, $visitProperties->getProperties())); } @@ -679,8 +682,11 @@ class GoalManager * _Note: Subscribers should be wary of doing any expensive computation here as it may slow * the tracker down._ * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param array $conversion The conversion entity that was just persisted. See what information * it contains [here](/guides/persistence-and-the-mysql-backend#conversions). + * @deprecated */ Piwik::postEvent('Tracker.recordStandardGoals', array($conversion)); } @@ -700,11 +706,14 @@ class GoalManager * * This event can be used to modify conversion information or to add new information to be persisted. * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param array $conversion The conversion entity. Read [this](/guides/persistence-and-the-mysql-backend#conversions) * to see what it contains. * @param array $visitInformation The visit entity that we are tracking a conversion for. See what * information it contains [here](/guides/persistence-and-the-mysql-backend#visits). * @param \Piwik\Tracker\Request $request An object describing the tracking request being processed. + * @deprecated */ Piwik::postEvent('Tracker.newConversionInformation', array(&$conversion, $visitInformation, $request)); diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php index 915f3cf654..da0959b8b0 100644 --- a/core/Tracker/Visit.php +++ b/core/Tracker/Visit.php @@ -204,9 +204,12 @@ class Visit implements VisitInterface * This event can be used to modify the visit properties that will be updated before the changes * are persisted. * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param array &$valuesToUpdate Visit entity properties that will be updated. * @param array $visit The entire visit entity. Read [this](/guides/persistence-and-the-mysql-backend#visits) * to see what it contains. + * @deprecated */ Piwik::postEvent('Tracker.existingVisitInformation', array(&$valuesToUpdate, $this->visitProperties->getProperties())); @@ -267,9 +270,13 @@ class Visit implements VisitInterface * This event can be used to modify the visit entity or add new information to it before it is persisted. * The UserCountry plugin, for example, uses this event to add location information for each visit. * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * * @param array &$visit The visit entity. Read [this](/guides/persistence-and-the-mysql-backend#visits) to see * what information it contains. * @param \Piwik\Tracker\Request $request An object describing the tracking request being processed. + * + * @deprecated */ Piwik::postEvent('Tracker.newVisitorInformation', array($this->visitProperties->getProperties(), $this->request)); diff --git a/core/Tracker/Visitor.php b/core/Tracker/Visitor.php index 92036ff974..2619c98987 100644 --- a/core/Tracker/Visitor.php +++ b/core/Tracker/Visitor.php @@ -53,4 +53,4 @@ class Visitor { return $this->visitorKnown = $isVisitorKnown; } -} +}
\ No newline at end of file diff --git a/core/Tracker/VisitorRecognizer.php b/core/Tracker/VisitorRecognizer.php index 4f63017e43..ff91f57d7e 100644 --- a/core/Tracker/VisitorRecognizer.php +++ b/core/Tracker/VisitorRecognizer.php @@ -246,6 +246,10 @@ class VisitorRecognizer * events such as 'onExistingVisit'. * * Plugins can use this event to load additional visit entity properties for later use during tracking. + * + * This event is deprecated, use [Dimensions](http://developer.piwik.org/guides/dimensions) instead. + * + * @deprecated */ $this->eventDispatcher->postEvent('Tracker.getVisitFieldsToPersist', array(&$fields)); |