private function PiwikReportsController::piwik_reports_get_goals in Piwik Reports 8
Return a list of goals active on selected site.
Parameters
string $token_auth: Piwik server token auth.
string $site: Selected site id.
Return value
array|string|bool Goals returned from Piwik reports API.
1 call to PiwikReportsController::piwik_reports_get_goals()
- PiwikReportsController::reports in src/
Controller/ PiwikReportsController.php - Reports.
File
- src/
Controller/ PiwikReportsController.php, line 323 - Contains \Drupal\piwik_reports\Controller\PiwikReportsController.
Class
- PiwikReportsController
- Class PiwikReportsController.
Namespace
Drupal\piwik_reports\ControllerCode
private function piwik_reports_get_goals($token_auth, $site) {
$piwik_url = PiwikData::getUrl();
if ($piwik_url) {
return PiwikData::getResponse($piwik_url . 'index.php?module=API&method=Goals.getGoals&idSite=' . (int) $site . '&format=JSON&token_auth=' . $token_auth);
}
else {
return FALSE;
}
}