mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
addons/google_analytics 새 추적 코드(ga.js)로 교체
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3401 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
35f745ab32
commit
60388d4496
1 changed files with 12 additions and 9 deletions
|
|
@ -8,20 +8,23 @@
|
||||||
**/
|
**/
|
||||||
|
|
||||||
// 관리자 모듈이면 패스~
|
// 관리자 모듈이면 패스~
|
||||||
if(Context::get('module')=='admin') return;
|
if(Context::get('module')=='admin') return;
|
||||||
|
|
||||||
// 한번만 출력시키기 위해 전역변수에 호출되었음을 체크해 놓음 (called position과 상관없음)
|
// 한번만 출력시키기 위해 전역변수에 호출되었음을 체크해 놓음 (called position과 상관없음)
|
||||||
if($GLOBALS['_called_ga_']) return;
|
if($GLOBALS['_called_addon_google_analytics_']) return;
|
||||||
$GLOBALS['_called_ga_'] = true;
|
$GLOBALS['_called_addon_google_analytics_'] = true;
|
||||||
|
|
||||||
$js_code = <<<EndOfCss
|
$js_code = <<<EndOfGA
|
||||||
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
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"));
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
_uacct = "{$addon_info->uacct}";
|
var pageTracker = _gat._getTracker("{$addon_info->uacct}");
|
||||||
urchinTracker();
|
pageTracker._initData();
|
||||||
|
pageTracker._trackPageview();
|
||||||
</script>
|
</script>
|
||||||
EndOfCss;
|
EndOfGA;
|
||||||
|
|
||||||
Context::addHtmlFooter($js_code);
|
Context::addHtmlFooter($js_code);
|
||||||
?>
|
?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue