当前位置: 首页>>代码示例>>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;未经允许,请勿转载。