Loading matomo.module +8 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ function matomo_page_attachments(array &$page) { $id = $config->get('site_id') ?? ''; $request = \Drupal::request(); if (empty($id)) { // Tracking is disabled if no site ID had been configured yet. return; } // Add module cache tags. $page['#cache']['tags'] = Cache::mergeTags($page['#cache']['tags'] ?? [], $config->getCacheTags()); Loading Loading @@ -77,10 +82,9 @@ function matomo_page_attachments(array &$page) { '404', ]; // 1. Check if the matomo account number has a valid value. // 2. Track page views based on visibility value. // 3. Check if we should track the currently active user's role. if (preg_match('/^\d{1,}$/', $id) && (_matomo_visibility_pages() || in_array($status, $trackable_status_codes)) && _matomo_visibility_user($account)) { // 1. Track page views based on visibility value. // 2. Check if we should track the currently active user's role. if ((_matomo_visibility_pages() || in_array($status, $trackable_status_codes)) && _matomo_visibility_user($account)) { $url_http = $config->get('url_http'); $url_https = $config->get('url_https'); Loading Loading
matomo.module +8 −4 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ function matomo_page_attachments(array &$page) { $id = $config->get('site_id') ?? ''; $request = \Drupal::request(); if (empty($id)) { // Tracking is disabled if no site ID had been configured yet. return; } // Add module cache tags. $page['#cache']['tags'] = Cache::mergeTags($page['#cache']['tags'] ?? [], $config->getCacheTags()); Loading Loading @@ -77,10 +82,9 @@ function matomo_page_attachments(array &$page) { '404', ]; // 1. Check if the matomo account number has a valid value. // 2. Track page views based on visibility value. // 3. Check if we should track the currently active user's role. if (preg_match('/^\d{1,}$/', $id) && (_matomo_visibility_pages() || in_array($status, $trackable_status_codes)) && _matomo_visibility_user($account)) { // 1. Track page views based on visibility value. // 2. Check if we should track the currently active user's role. if ((_matomo_visibility_pages() || in_array($status, $trackable_status_codes)) && _matomo_visibility_user($account)) { $url_http = $config->get('url_http'); $url_https = $config->get('url_https'); Loading