public static function getReferrerSummaryForVisit($visit)
    {
        $referrerType = $visit->getColumn('referrerType');
        if ($referrerType === false
            || $referrerType == 'direct'
        ) {
            return Piwik::translate('Referrers_DirectEntry');
        }

        if ($referrerType == 'search') {
            $referrerName = $visit->getColumn('referrerName');

            $keyword = $visit->getColumn('referrerKeyword');
            if ($keyword !== false
                && $keyword != APIReferrers::getKeywordNotDefinedString()
            ) {
                $referrerName .= ' (' . $keyword . ')';
            }
            return $referrerName;
        }

        if ($referrerType == 'campaign') {

            $summary = Piwik::translate('Referrers_ColumnCampaign') . ': ' . $visit->getColumn('referrerName');
            $keyword = $visit->getColumn('referrerKeyword');
            if (!empty($keyword)) {
                $summary .= ' - ' . $keyword;
            }

            return $summary;
        }

        return $visit->getColumn('referrerName');
    }
public static function getReferrerSummaryForVisit($visit)
    {
        $referrerType = $visit->getColumn('referrerType');
        if ($referrerType === false
            || $referrerType == 'direct'
        ) {
            return Piwik::translate('Referrers_DirectEntry');
        }

        if ($referrerType == 'search') {
            $referrerName = $visit->getColumn('referrerName');

            $keyword = $visit->getColumn('referrerKeyword');
            if ($keyword !== false
                && $keyword != APIReferrers::getKeywordNotDefinedString()
            ) {
                $referrerName .= ' (' . $keyword . ')';
            }
            return $referrerName;
        }

        if ($referrerType == 'campaign') {

            $summary = Piwik::translate('Referrers_ColumnCampaign') . ': ' . $visit->getColumn('referrerName');
            $keyword = $visit->getColumn('referrerKeyword');
            if (!empty($keyword)) {
                $summary .= ' - ' . $keyword;
            }

            return $summary;
        }

        return $visit->getColumn('referrerName');
    }
public static function getReferrerSummaryForVisit ( $ visit ) { $ referrerType = $ visit -> getColumn ( 'referrerType' ) ; if ( $ referrerType === false || $ referrerType == 'direct' ) { return Piwik :: translate ( 'Referrers_DirectEntry' ) ; } if ( $ referrerType == 'search' ) { $ referrerName = $ visit -> getColumn ( 'referrerName' ) ; $ keyword = $ visit -> getColumn ( 'referrerKeyword' ) ; if ( $ keyword !== false && $ keyword != APIReferrers :: getKeywordNotDefinedString ( ) ) { $ referrerName .= ' (' . $ keyword . ')' ; } return $ referrerName ; } if ( $ referrerType == 'campaign' ) { $ summary = Piwik :: translate ( 'Referrers_ColumnCampaign' ) . ': ' . $ visit -> getColumn ( 'referrerName' ) ; $ keyword = $ visit -> getColumn ( 'referrerKeyword' ) ; if ( ! empty ( $ keyword ) ) { $ summary .= ' - ' . $ keyword ; } return $ summary ; } return $ visit -> getColumn ( 'referrerName' ) ; }
Returns a summary for a visit's referral.

@param DataTable\Row $visit
@return bool|mixed|string
Returns a summary for a visit s referral .