Merge branch 'add-matomo-wordpress' into 'main'
add matomo part in cn-cookies for wordpress See merge request ldc-web/projets/ldc-web-cookie-notice!5
This commit is contained in:
commit
e5f90fcbf0
1 changed files with 30 additions and 0 deletions
|
|
@ -181,6 +181,36 @@ gtag('js', new Date());
|
|||
gtag('config', 'G-GVRHBCHE09');
|
||||
}
|
||||
SCRIPT;
|
||||
|
||||
// MATOMO
|
||||
$cookies['matomo'] = [
|
||||
'name' => 'Matomo',
|
||||
'description' => 'Les services de mesure d\'audience permettent de générer des statistiques de fréquentation utiles à l\'amélioration du site.',
|
||||
'link' => 'https://fr.matomo.org/gdpr-analytics/',
|
||||
'labelLink' => 'En savoir +',
|
||||
'cookies' => ['_pk']
|
||||
];
|
||||
|
||||
$cookies['matomo']['script'] = <<<SCRIPT
|
||||
function () {
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//yl.s-web.fr/";
|
||||
_paq.push(['setTrackerUrl', u+'rainbow']);
|
||||
_paq.push(['setSiteId', '
|
||||
SCRIPT;
|
||||
$cookies['matomo']['script'] .= MATOMO_SITE_ID;
|
||||
$cookies['matomo']['script'] .= <<<SCRIPT
|
||||
']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'unicorn'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
}
|
||||
SCRIPT;
|
||||
|
||||
?>
|
||||
|
||||
<?php include('cookie-notice-templates/standard.php'); ?>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue