• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/analytics/counter.php
  • Класс: BitrixMainAnalyticsCounter
  • Вызов: Counter::onBeforeEndBufferContent
static function onBeforeEndBufferContent()
{
	$request = Context::getCurrent()->getRequest();
	$isAjaxRequest = $request->isAjaxRequest();
	$isAdminSection = defined("ADMIN_SECTION") && ADMIN_SECTION === true;
	if ($isAjaxRequest || $isAdminSection)
	{
		return;
	}

	$isSlider = $request->getQuery('IFRAME') === "Y";
	if (static::$bufferRestarted === true && !$isSlider)
	{
		return;
	}

	$settings = Configuration::getValue("analytics_counter");
	$forceEnabled = isset($settings["enabled"]) && $settings["enabled"] === true;

	if ($forceEnabled === false && SiteSpeed::isIntranetSite(SITE_ID))
	{
		return;
	}

	if (SiteSpeed::isOn() && static::$enabled === true)
	{
		Counter::injectIntoPage();
	}
}