Piwik\Plugins\ExampleTracker\Columns\ExampleConversionDimension::onGoalConversion PHP Method

onGoalConversion() public method

Return boolean false if you do not want to change the value in some cases. If you do not want to perform any action on an ecommerce order at all it is recommended to just remove this method.
public onGoalConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
$goalManager Piwik\Tracker\GoalManager
return mixed | false
    public function onGoalConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
    {
        $goalId = $goalManager->getGoalColumn('idgoal');
        if ($visitor->isVisitorKnown()) {
            return $goalId;
        }
        return false;
    }