Révision cd5c298a
Ajouté par Geoffroy Desvernay il y a plus de 5 ans
drupal7/sites/all/modules/matomo/matomo.module | ||
---|---|---|
7 | 7 |
* Adds the required Javascript to all your Drupal pages to allow tracking by |
8 | 8 |
* the Matomo statistics package. |
9 | 9 |
* |
10 |
* @author: Alexander Hass <http://drupal.org/user/85918> |
|
10 |
* @author: Alexander Hass <https://drupal.org/user/85918>
|
|
11 | 11 |
*/ |
12 | 12 |
|
13 | 13 |
/** |
... | ... | |
17 | 17 |
|
18 | 18 |
/** |
19 | 19 |
* Define default path exclusion list to remove tracking from admin pages, |
20 |
* see http://drupal.org/node/34970 for more information. |
|
20 |
* see https://drupal.org/node/34970 for more information.
|
|
21 | 21 |
*/ |
22 | 22 |
define('MATOMO_PAGES', "admin\nadmin/*\nbatch\nnode/add*\nnode/*/*\nuser/*/*"); |
23 | 23 |
|
... | ... | |
27 | 27 |
function matomo_help($path, $arg) { |
28 | 28 |
switch ($path) { |
29 | 29 |
case 'admin/config/system/matomo': |
30 |
return t('<a href="@pk_url">Matomo Analytics</a> is an open source (GPL license) web analytics software. It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speak... and so much more. Matomo aims to be an open source alternative to Google Analytics.', array('@pk_url' => 'http://www.matomo.org/')); |
|
30 |
return t('<a href="@pk_url">Matomo Analytics</a> is an open source (GPL license) web analytics software. It gives interesting reports on your website visitors, your popular pages, the search engines keywords they used, the language they speak... and so much more. Matomo aims to be an open source alternative to Google Analytics.', array('@pk_url' => 'https://www.matomo.org/'));
|
|
31 | 31 |
} |
32 | 32 |
} |
33 | 33 |
|
... | ... | |
239 | 239 |
$codesnippet_before = variable_get('matomo_codesnippet_before', ''); |
240 | 240 |
$codesnippet_after = variable_get('matomo_codesnippet_after', ''); |
241 | 241 |
|
242 |
// Build tracker code. See http://matomo.org/docs/javascript-tracking/#toc-asynchronous-tracking |
|
242 |
// Build tracker code. See https://matomo.org/docs/javascript-tracking/#toc-asynchronous-tracking
|
|
243 | 243 |
$script = 'var _paq = _paq || [];'; |
244 | 244 |
$script .= '(function(){'; |
245 | 245 |
$script .= 'var u=(("https:" == document.location.protocol) ? "' . check_url($url_https) . '" : "' . check_url($url_http) . '");'; |
... | ... | |
319 | 319 |
); |
320 | 320 |
// Disable the download & outlink tracking for specific CSS classes. |
321 | 321 |
// Custom code snippets with 'setIgnoreClasses' will override the value. |
322 |
// http://developer.matomo.org/api-reference/tracking-javascript#disable-the-download-amp-outlink-tracking-for-specific-css-classes |
|
322 |
// https://developer.matomo.org/api-reference/tracking-javascript#disable-the-download-amp-outlink-tracking-for-specific-css-classes
|
|
323 | 323 |
$script .= '_paq.push(["setIgnoreClasses", ' . drupal_json_encode($ignore_classes) . ']);'; |
324 | 324 |
|
325 | 325 |
// Enable download & outlink link tracking. |
... | ... | |
553 | 553 |
/** |
554 | 554 |
* Helper function for grabbing search keys. Function is missing in D7. |
555 | 555 |
* |
556 |
* http://api.drupal.org/api/function/search_get_keys/6 |
|
556 |
* https://api.drupal.org/api/function/search_get_keys/6
|
|
557 | 557 |
*/ |
558 | 558 |
function matomo_search_get_keys() { |
559 | 559 |
static $return; |
Formats disponibles : Unified diff
MAJ 7.60 -> 7.62