Exemple #1
0
 /**
  * @param $action
  * @return bool true if the outlink the visitor clicked on points to one of the known hosts for this website
  */
 protected function detectActionIsOutlinkOnAliasHost(Piwik_Tracker_Action_Interface $action)
 {
     if ($action->getActionType() != Piwik_Tracker_Action_Interface::TYPE_OUTLINK) {
         return false;
     }
     $actionUrl = $action->getActionUrl();
     $actionUrlParsed = @parse_url(html_entity_decode($actionUrl));
     if (!isset($actionUrlParsed['host'])) {
         return false;
     }
     return $this->isHostKnownAliasHost($actionUrlParsed['host']);
 }
Exemple #2
0
 /**
  * Detect whether action is an outlink given host aliases
  *
  * @param Piwik_Tracker_Action_Interface $action
  * @return bool true if the outlink the visitor clicked on points to one of the known hosts for this website
  */
 protected function detectActionIsOutlinkOnAliasHost(Piwik_Tracker_Action_Interface $action)
 {
     if ($action->getActionType() != Piwik_Tracker_Action_Interface::TYPE_OUTLINK) {
         return false;
     }
     $decodedActionUrl = $action->getActionUrl();
     $actionUrlParsed = @parse_url($decodedActionUrl);
     if (!isset($actionUrlParsed['host'])) {
         return false;
     }
     return Piwik_Tracker_Visit::isHostKnownAliasHost($actionUrlParsed['host'], $this->idsite);
 }