setSegment('contentInteraction'); $segment->setName('Contents_Interaction'); $segment->setAcceptedValues('The type of interaction with the content. For instance "click" or "submit".'); $this->addSegment($segment); } public function getName() { return Piwik::translate('Contents_Interaction'); } public function getActionId() { return Action::TYPE_CONTENT_INTERACTION; } public function onLookupAction(Request $request, Action $action) { $interaction = $request->getParam('c_i'); if (empty($interaction)) { return false; } $interaction = trim($interaction); if (strlen($interaction) > 0) { return $interaction; } return false; } }