diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-27 14:55:30 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-27 14:55:30 +0400 |
commit | 455c11e98418485e2835d39eaeec5c331b9a98a9 (patch) | |
tree | 5c6ac61b0309877bd1b6209ee85dc654bb83694f /core/Tracker/GoalManager.php | |
parent | 94bbcaaa621dcc52bdd8ef672c9175ad5a8f424b (diff) |
Adding new hook to enrich Conversions + minor changes
Diffstat (limited to 'core/Tracker/GoalManager.php')
-rw-r--r-- | core/Tracker/GoalManager.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index 91560fe43c..662f86a445 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -789,6 +789,15 @@ class GoalManager */ protected function insertNewConversion($newGoal) { + /** + * This hook is called before inserting a new Goal Conversion.. You can use it to update the Goal + * attributes before they are saved in the log_conversion table. + * `$visitor` contains the current known visit information. + * @param array $goal Array of SQL fields value for this conversion, will be inserted in the log_conversion table + * @param \Piwik\Tracker\Request $request + */ + Piwik::postEvent('Tracker.newConversionInformation', array($newGoal, $this->request)); + $newGoalDebug = $newGoal; $newGoalDebug['idvisitor'] = bin2hex($newGoalDebug['idvisitor']); Common::printDebug($newGoalDebug); |