Openstat from direct.yandex.ru


#1

direct.yandex.ru allows you to transfer statistics via get parameter _openstat. I have to use a crutch. Can You add this possibility in the release of piwik? I do _openstat as keywords (setCampaignKeywordKey), then decoder from base 64.

plugins/Referrers/Columns/Base.php



    /**
     * @param string $string
     * @return bool
     */
    protected function detectCampaignFromString($string)
    {
        foreach ($this->campaignNames as $campaignNameParameter) {
            $campaignName = trim(urldecode(UrlHelper::getParameterFromQueryString($string, $campaignNameParameter)));
            if (!empty($campaignName)) {
                break;
            }
        }

        if (empty($campaignName)) {
            return false;
        }
        $this->typeReferrerAnalyzed = Common::REFERRER_TYPE_CAMPAIGN;
        $this->nameReferrerAnalyzed = $campaignName;

        foreach ($this->campaignKeywords as $campaignKeywordParameter) {
            $campaignKeyword = UrlHelper::getParameterFromQueryString($string, $campaignKeywordParameter);
            if (!empty($campaignKeyword)) {
                $this->keywordReferrerAnalyzed = trim(urldecode($campaignKeyword));

 //Декодирование опенстат от яндекса   (openstat direct.yandex.ru)            
if ($campaignKeywordParameter=='_openstat')$this->keywordReferrerAnalyzed=base64_decode($this->keywordReferrerAnalyzed);
                
                
                break;
            }
        }
        return !empty($this->keywordReferrerAnalyzed);
    }