1
0
mirror of https://github.com/typemill/typemill.git synced 2025-10-17 23:56:09 +02:00

Version 1.1.3. Admin Dashboard

This commit is contained in:
Sebastian
2018-04-18 19:49:12 +02:00
parent c5c84c96bc
commit f8dc7093bf
65 changed files with 3285 additions and 1044 deletions

View File

@@ -30,15 +30,18 @@ class Analytics extends Plugin
$analyticSettings = $this->settings['settings']['plugins']['analytics'];
/* fetch the template, render it with twig and add javascript with settings */
if($analyticSettings['tool'] == 'piwik')
if(isset($analyticsSettings['tool']))
{
$this->addInlineJS($twig->fetch('/piwikanalytics.twig', $this->settings));
}
elseif($analyticSettings['tool'] == 'google')
{
$this->addJS('https://www.googletagmanager.com/gtag/js?id=' . $analyticSettings['google_id']);
$this->addInlineJS($twig->fetch('/googleanalytics.twig', $analyticSettings));
/* fetch the template, render it with twig and add javascript with settings */
if($analyticSettings['tool'] == 'piwik')
{
$this->addInlineJS($twig->fetch('/piwikanalytics.twig', $this->settings));
}
elseif($analyticSettings['tool'] == 'google')
{
$this->addJS('https://www.googletagmanager.com/gtag/js?id=' . $analyticSettings['google_id']);
$this->addInlineJS($twig->fetch('/googleanalytics.twig', $analyticSettings));
}
}
}
}