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