Piwik\Tracker\VisitExcluded::isUserAgentExcluded PHP Method

isUserAgentExcluded() protected method

Visits whose user agent string contains one of the excluded_user_agents strings for the site being tracked (or one of the global strings) will be excluded.
protected isUserAgentExcluded ( ) : boolean
return boolean
    protected function isUserAgentExcluded()
    {
        $websiteAttributes = Cache::getCacheWebsiteAttributes($this->idSite);
        if (!empty($websiteAttributes['excluded_user_agents'])) {
            foreach ($websiteAttributes['excluded_user_agents'] as $excludedUserAgent) {
                // if the excluded user agent string part is in this visit's user agent, this visit should be excluded
                if (stripos($this->userAgent, $excludedUserAgent) !== false) {
                    return true;
                }
            }
        }
        return false;
    }