Browse Source

Gestion des statistiques

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
62a2f210c3
4 changed files with 18 additions and 0 deletions
  1. +1
    -0
      backend/views/layouts/main.php
  2. +15
    -0
      common/views/matomo.php
  3. +1
    -0
      frontend/views/layouts/main.php
  4. +1
    -0
      producer/views/layouts/main.php

+ 1
- 0
backend/views/layouts/main.php View File

<title><?= Html::encode($this->page_title) ?> | Opendistrib</title> <title><?= Html::encode($this->page_title) ?> | Opendistrib</title>
<link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManagerBackend->getBaseUrl(); ?>/img/favicon-distrib.png" /> <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManagerBackend->getBaseUrl(); ?>/img/favicon-distrib.png" />
<?php $this->head() ?> <?php $this->head() ?>
<?= $this->render('@common/views/matomo.php') ?>
</head> </head>
<body class="<?= Yii::$app->controller->id.'-'.Yii::$app->controller->action->id ?> hold-transition <?= \dmstr\helpers\AdminLteHelper::skinClass() ?> sidebar-mini"> <body class="<?= Yii::$app->controller->id.'-'.Yii::$app->controller->action->id ?> hold-transition <?= \dmstr\helpers\AdminLteHelper::skinClass() ?> sidebar-mini">
<?php $this->beginBody() ?> <?php $this->beginBody() ?>

+ 15
- 0
common/views/matomo.php View File

<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//<?= Yii::$app->params['matomoUrl']; ?>/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '<?= Yii::$app->params['matomoIdSite']; ?>']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->

+ 1
- 0
frontend/views/layouts/main.php View File

<!--[if IE 7]> <!--[if IE 7]>
<link href="<?= $this->getUrlManager()->getBaseUrl(); ?>/css/ie7.css" rel="stylesheet"> <link href="<?= $this->getUrlManager()->getBaseUrl(); ?>/css/ie7.css" rel="stylesheet">
<![endif]--> <![endif]-->
<?= $this->render('@common/views/matomo.php') ?>
</head> </head>
<body class="<?php if ($isHome): echo 'home'; endif; ?><?php if (!Yii::$app->user->isGuest): ?> connected<?php endif; ?>"> <body class="<?php if ($isHome): echo 'home'; endif; ?><?php if (!Yii::$app->user->isGuest): ?> connected<?php endif; ?>">
<?php $this->beginBody() ?> <?php $this->beginBody() ?>

+ 1
- 0
producer/views/layouts/main.php View File

<link rel="icon" type="image/png" <link rel="icon" type="image/png"
href="<?php echo \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon-distrib.png"/> href="<?php echo \Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon-distrib.png"/>
<?php $this->head() ?> <?php $this->head() ?>
<?= $this->render('@common/views/matomo.php') ?>
</head> </head>
<body class="<?= \Yii::$app->controller->id . '-' . \Yii::$app->controller->action->id ?>"> <body class="<?= \Yii::$app->controller->id . '-' . \Yii::$app->controller->action->id ?>">
<?php $this->beginBody() ?> <?php $this->beginBody() ?>

Loading…
Cancel
Save