diff --git a/app/inc/config.template.php b/app/inc/config.template.php index 71bb8841abdf242e73d112fbf06dd43bb2f5974e..0d90e30349b9155caa7cf1ecac4cfb943c7817a8 100644 --- a/app/inc/config.template.php +++ b/app/inc/config.template.php @@ -85,6 +85,7 @@ const TIME_EDIT_LINK_EMAIL = 60; $config = [ /* general config */ 'use_smtp' => true, // use email for polls creation/modification/responses notification + 'tracking_code' => '', // add HTML code to every page, useful for tools like Piwik /* home */ 'show_what_is_that' => true, // display "how to use" section 'show_the_software' => true, // display technical information about the software diff --git a/app/inc/smarty.php b/app/inc/smarty.php index 2e4737c6b3284242a0012a20b5a11c9532feb457..41024a7f20cb8d416e785ff06538837873ffc074 100644 --- a/app/inc/smarty.php +++ b/app/inc/smarty.php @@ -33,6 +33,9 @@ $smarty->assign('use_nav_js', strstr($_SERVER['SERVER_NAME'], 'framadate.org')); $smarty->assign('locale', $locale); $smarty->assign('langs', $ALLOWED_LANGUAGES); $smarty->assign('date_format', $date_format); +if (isset($config['tracking_code'])) { + $smarty->assign('tracking_code', $config['tracking_code']); +} // Dev Mode if (isset($_SERVER['FRAMADATE_DEVMODE']) && $_SERVER['FRAMADATE_DEVMODE']) { diff --git a/tpl/page.tpl b/tpl/page.tpl index 1633957650d749a68d81048d057b9f6676a1b035..4271730796e50d4044b68a533f335fc359476b19 100644 --- a/tpl/page.tpl +++ b/tpl/page.tpl @@ -37,5 +37,8 @@ </main> </div> <!-- .container --> +{if isset($tracking_code)} + {$tracking_code} +{/if} </body> </html>