當前位置: 首頁>>代碼示例>>PHP>>正文


PHP owa_coreAPI::getJsTrackerTag方法代碼示例

本文整理匯總了PHP中owa_coreAPI::getJsTrackerTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP owa_coreAPI::getJsTrackerTag方法的具體用法?PHP owa_coreAPI::getJsTrackerTag怎麽用?PHP owa_coreAPI::getJsTrackerTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在owa_coreAPI的用法示例。


在下文中一共展示了owa_coreAPI::getJsTrackerTag方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 function render($data)
 {
     $site = $this->get('site');
     if ($site->get('name')) {
         $name = sprintf("%s (%s)", $site->get('domain'), $site->get('name'));
     } else {
         $name = $site->get('domain');
     }
     //page title
     $this->t->set('page_title', 'Tracking Tags');
     $this->body->set('site', $site);
     $this->body->set('name', $name);
     $this->body->set('options', array());
     // load body template
     $this->body->set_template('sites_invocation.tpl');
     $this->body->set('site_id', $this->get('site_id'));
     $this->body->set('tracking_code', owa_coreAPI::getJsTrackerTag($this->get('site_id')));
 }
開發者ID:ashutoshdev,項目名稱:Open-Web-Analytics,代碼行數:18,代碼來源:sitesInvocation.php

示例2: placeHelperPageTags

 /**
  * Returns a configured javascript tracker for inclusion in your web page.
  * You can pass an options array to control what the tracker will log.
  * The options array is a key/value pair format like:
  *
  * $options = array('do_not_log_pageview' => true);
  *
  * Option keys include: 'do_not_log_pageview', 'do_not_log_clicks', 'do_not_log_domstream'
  *
  * @param 	$echo		bool 	if true the function will echo. if false the tracker is returned asa string.
  * @param	$options	array	an key value pair option array 
  * @return 	$tag 		string	the tracker javascript.
  */
 function placeHelperPageTags($echo = true, $options = array())
 {
     if (!owa_coreAPI::getRequestParam('is_robot')) {
         // check to see if first hit tag is needed
         if (isset($options['delay_first_hit']) || owa_coreAPI::getSetting('base', 'delay_first_hit')) {
             $service =& owa_coreAPI::serviceSingleton();
             //check for persistant cookie
             $v = $service->request->getOwaCookie('v');
             if (empty($v)) {
                 $options['first_hit_tag'] = true;
             }
         }
         if (!class_exists('owa_template')) {
             require_once OWA_BASE_CLASSES_DIR . 'owa_template.php';
         }
         $t = new owa_template();
         $t->set_template('js_helper_tags.tpl');
         $tracking_code = owa_coreAPI::getJsTrackerTag($this->getSiteId(), $options);
         $t->set('tracking_code', $tracking_code);
         $tag = $t->fetch();
         if ($echo == false) {
             return $tag;
         } else {
             echo $tag;
         }
     }
 }
開發者ID:nishantmendiratta,項目名稱:Open-Web-Analytics,代碼行數:40,代碼來源:owa_caller.php


注:本文中的owa_coreAPI::getJsTrackerTag方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。