From 2dde6eb0345c45b958dd1f5f81d5daa0fe89a067 Mon Sep 17 00:00:00 2001 From: pyg77 Date: Fri, 24 Jun 2011 16:42:53 +0200 Subject: [PATCH] Analytics --- bandeaux.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bandeaux.php b/bandeaux.php index ca4e19f..88bac56 100644 --- a/bandeaux.php +++ b/bandeaux.php @@ -50,6 +50,24 @@ function framanav() } } +function gAnalytics() { +echo << + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-896440-11']); + _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); + })(); + + +gAnalytics; +} + //le logo function logo () @@ -116,6 +134,8 @@ function sous_bandeau_admin() '' . liste_lang() . ''. ''."\n"; + + gAnalytics(); } @@ -148,6 +168,7 @@ function bandeau_pied() '' . liste_lang() . ''. '' . "\n"; + gAnalytics(); } @@ -166,4 +187,5 @@ function bandeau_pied_mobile() '' . liste_lang() . ''. '' . "\n"; + gAnalytics(); } \ No newline at end of file