From 60388d449646d28a3def0c31f48e0c0eae492412 Mon Sep 17 00:00:00 2001 From: bnu Date: Sat, 22 Dec 2007 18:01:23 +0000 Subject: [PATCH] =?UTF-8?q?addons/google=5Fanalytics=20=EC=83=88=20?= =?UTF-8?q?=EC=B6=94=EC=A0=81=20=EC=BD=94=EB=93=9C(ga.js)=EB=A1=9C=20?= =?UTF-8?q?=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3401 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../google_analytics.addon.php | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/addons/google_analytics/google_analytics.addon.php b/addons/google_analytics/google_analytics.addon.php index 387b3891e..733ed9400 100644 --- a/addons/google_analytics/google_analytics.addon.php +++ b/addons/google_analytics/google_analytics.addon.php @@ -8,20 +8,23 @@ **/ // 관리자 모듈이면 패스~ - if(Context::get('module')=='admin') return; + if(Context::get('module')=='admin') return; // 한번만 출력시키기 위해 전역변수에 호출되었음을 체크해 놓음 (called position과 상관없음) - if($GLOBALS['_called_ga_']) return; - $GLOBALS['_called_ga_'] = true; + if($GLOBALS['_called_addon_google_analytics_']) return; + $GLOBALS['_called_addon_google_analytics_'] = true; - $js_code = << + $js_code = << +var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); +document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -EndOfCss; +EndOfGA; Context::addHtmlFooter($js_code); -?> +?> \ No newline at end of file