Skip to content
Snippets Groups Projects
Commit 0e22d6b1 authored by Dimitra Chatzichrysou's avatar Dimitra Chatzichrysou
Browse files

Update Matomo configuration

parent 111dc593
No related branches found
No related tags found
1 merge request!3Update Matomo configuration
......@@ -201,25 +201,8 @@ function cern_integration_form_simplesamlphp_auth_syncing_settings_form_alter(&$
* @see /admin/config/system/matomo
*/
function cern_integration_form_matomo_admin_settings_alter(&$form, &$form_state, $form_id){
$form['general']['matomo_site_id']['#disabled'] = TRUE;
$form['general']['matomo_url_http']['#disabled'] = TRUE;
$form['general']['matomo_url_https']['#disabled'] = TRUE;
global $base_url;
$_finalurl = $base_url;
$_searches = array("http://","https://",".web.cern.ch");
$_finalurl = str_replace($_searches, "", $_finalurl);
$form['cern_view_statistics'] = array(
'#type' => 'fieldset',
'#title' => t('View statistics'),
'#weight' => - 30
);
$_markup = \Drupal\Core\Link::fromTextAndUrl('WebServices website', \Drupal\Core\Url::fromUri("https://webservices.web.cern.ch/webservices/Tools/Piwik/?SiteName=$_finalurl"))->toString();
$form['cern_view_statistics']['matomo_link'] = array(
'#markup' => "Please go to " . $_markup . " to view statistics gathered by Matomo/Piwik for your site."
);
}
######################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment