Ver código fonte

Gestion des statistiques

feature/souke
Guillaume Bourgeois 1 ano atrás
pai
commit
62a2f210c3
4 arquivos alterados com 18 adições e 0 exclusões
  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 Ver arquivo

@@ -72,6 +72,7 @@ if (Yii::$app->controller->action->id === 'login') {
<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" />
<?php $this->head() ?>
<?= $this->render('@common/views/matomo.php') ?>
</head>
<body class="<?= Yii::$app->controller->id.'-'.Yii::$app->controller->action->id ?> hold-transition <?= \dmstr\helpers\AdminLteHelper::skinClass() ?> sidebar-mini">
<?php $this->beginBody() ?>

+ 15
- 0
common/views/matomo.php Ver arquivo

@@ -0,0 +1,15 @@
<!-- 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 Ver arquivo

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

+ 1
- 0
producer/views/layouts/main.php Ver arquivo

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

Carregando…
Cancelar
Salvar