From 894b526effa22288fec4be4845869f95390fdff2 Mon Sep 17 00:00:00 2001 From: Simon Leblanc Date: Sat, 2 Jul 2011 23:13:56 +0200 Subject: [PATCH] Fix issue #11 : Google Analytics n'est plus obligatoire --- bandeaux.php | 18 +++++++++--------- variables.php.template | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bandeaux.php b/bandeaux.php index c79c3c9..f7d9f27 100644 --- a/bandeaux.php +++ b/bandeaux.php @@ -51,21 +51,21 @@ function framanav() } function gAnalytics() { -echo << - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-896440-11']); - _gaq.push(['_trackPageview']); + _gaq.push([\'_setAccount\', \''.GOOGLE_ANALYTICS_ID.'\']); + _gaq.push([\'_trackPageview\']); (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; + ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; + var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })(); - -gAnalytics; +'; + } } diff --git a/variables.php.template b/variables.php.template index c822c90..e37ef0b 100644 --- a/variables.php.template +++ b/variables.php.template @@ -78,6 +78,9 @@ define('LOGOLETTRE', '