private function getNumberOfVisitsPiwik($block_id, $period='year'){
    
        $piwik_url = $this->module->getBlockSetting($block_id, 'piwik_url');
        $piwik_siteid = $this->module->getBlockSetting($block_id, 'piwik_siteid');
        $piwik_token = $this->module->getBlockSetting($block_id, 'piwik_token');
    
        if($piwik_url && strlen($piwik_url) > 0 &&
            $piwik_siteid  && strlen($piwik_siteid) > 0 &&
            $piwik_token && strlen($piwik_token)            
            ) 
        {        
            // calling Piwik REST API
            $url = $piwik_url;
            $url .= '?module=API&method=VisitsSummary.getVisits';
            $url .= '&idSite='.$piwik_siteid.'&period='.$period.'&date=today';
            $url .= '&format=PHP';
            $url .= '&token_auth='.$piwik_token;
        
            if($fetched = File::fetchUrl($url)) {
                $content = @unserialize($fetched);
                if(is_numeric($content)) return $content;
            }
        }
    
        return null;
    }