توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : معرفی سایتم به googleanalytics
سلام زمانی که میخواهم کدی را که googleanalytics به من داده است را قبل از تگ <body/> وارد کنم چه فایلی را باید در جوملا باز کنم؟ و از کجا این کار را انجام دهم؟ و در کدام قسمت این کد را باید قرار داد؟ لطفا به طور کامل این بخش را برایم شرح دهید
ممنون :)
مهدی.
01-20-2010, 07:55 PM
سلام
آموزش:Google Analytics Code (<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> de)
فایل index.php قالبی که در حال استفاده آن هستید.
زمستانتان سپید
سلام فایل index.php تگ <body/> را ندارد فقط دستورات php است < php ؟> لطفا راهنمایی کنید!!
احتمالا تگ موردنظر در فایل دیگه ای هست و اون فایل در index.php شما include شده.
مهدی.
01-23-2010, 03:38 PM
سورس فایل index.php را اینجا قرار دهید تا راهنمایی کنیم.
زمستانتان سپید
سلام
محتویات فایل index.php
---------------------------------------------------------------------------------------
<?php
/**
* @version $Id: index.php 11407 2009-01-09 17:23:42Z willebil $
* @package Joomla
* @copyright Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Set flag that this is a parent file
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
/**
* CREATE THE APPLICATION
*
* NOTE :
*/
$mainframe =& JFactory::getApplication('site');
/**
* INITIALISE THE APPLICATION
*
* NOTE :
*/
// set the language
$mainframe->initialise();
JPluginHelper::importPlugin('system');
// trigger the onAfterInitialise events
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');
/**
* ROUTE THE APPLICATION
*
* NOTE :
*/
$mainframe->route();
// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);
// trigger the onAfterRoute events
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');
/**
* DISPATCH THE APPLICATION
*
* NOTE :
*/
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);
// trigger the onAfterDispatch events
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');
/**
* RENDER THE APPLICATION
*
* NOTE :
*/
$mainframe->render();
// trigger the onAfterRender events
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');
/**
* RETURN THE RESPONSE
*/
echo JResponse::toString($mainframe->getCfg('gzip'));
---------------------------------------------------------------------------------
محتویات فایل index2.php
<?php
/**
* @version $Id: index2.php 11407 2009-01-09 17:23:42Z willebil $
* @package Joomla
* @copyright Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
$_REQUEST['tmpl'] = 'component';
include('index.php');
----------------------------------------------------------------------------------------------------------
اما یک فایل داخل پوشه images هست به نام index.html که تگ body را دارد.
محتویات این فایل:
<html><body bgcolor="#FFFFFF"></body></html>
** تگ کد اضافه شد
firoozmandan
01-24-2010, 07:17 AM
سلام
دوست عزیز شما Google Analytics Code را باید در فایل index قالب خود قرار بدید نه در index جوملا
مسیر فایل ایندکس قالب :
Templates/YourTemplateName/Index.php
یا علی
سلام
کدی که google به من داد:
------------------------------------------
<script type="text/javascript">
var gaJsHost = (("<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> == document.location.protocol) ? "<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> : "<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>);
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12630387-1");
pageTracker._trackPageview();
} catch(err) {}</script>
-------------------------------------------------------
کدی که شما در لینک آموزشی گذاشتید:
<script src="<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b> type="text/javascript">
</script>
<script type="text/javascript">
_uacct="youraccount";
urchinTracker();
</script>
------------------------------------------------
کدام باید بذارم؟ آیا فرقی هم می کنند؟ اکانتم :articlesit.gigfa.com
چه مدتی طول می کشد تا گوگل وضعیت سایتم نشان دهد الان تمام نمودارهای visitors و ترافیک... 0% نشان می دهد.
ممنونم از راهنمایی های خوبتون :)
** کدها در تگ مربوطه واقع شد
** هایپر لینک حذف شد
مهدی.
01-24-2010, 11:43 AM
از همان کدی که دریافت کردید استفاده فرمایید. تفاوت خاصی نمیکنند.
مدت زیادی طول نمیکشه که اطلاعاتی را به شما ارائه میکند.
زمستانتان سپید
vBulletin® v4.2.5, Copyright ©2000-2026, Jelsoft Enterprises Ltd.