Browse Source

[Backend] Statistiques : intégration tableau de bord Matomo

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
83d90d0ac9
3 changed files with 14 additions and 0 deletions
  1. +5
    -0
      backend/controllers/StatsAdminController.php
  2. +1
    -0
      backend/views/layouts/left.php
  3. +8
    -0
      backend/views/stats-admin/matomo.php

+ 5
- 0
backend/controllers/StatsAdminController.php View File

@@ -132,6 +132,11 @@ class StatsAdminController extends BackendController
'data' => $data,
]);
}

public function actionMatomo()
{
return $this->render('matomo');
}
}

?>

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

@@ -127,6 +127,7 @@ $userManager = $this->getUserManager();
'items' => [
['label' => 'Chiffre d\'affaire', 'icon' => 'line-chart', 'url' => ['/stats-admin/turnover'], 'visible' => $userManager->isCurrentAdmin()],
['label' => 'Commandes clients', 'icon' => 'calendar', 'url' => ['/stats-admin/customer-orders'], 'visible' => $userManager->isCurrentAdmin()],
['label' => 'Matomo', 'icon' => 'line-chart', 'url' => ['/stats-admin/matomo'], 'visible' => $userManager->isCurrentAdmin()],
],
],


+ 8
- 0
backend/views/stats-admin/matomo.php View File

@@ -0,0 +1,8 @@
<?php

$this->setTitle('Statistiques Matomo') ;
$this->addBreadcrumb('Statistiques Matomo') ;

?>

<iframe id="matomoframe" src="<?= Yii::$app->params['matomoWidgetDashbordUrl']; ?>" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="800px"></iframe>

Loading…
Cancel
Save