html 下一页:自定义BlueKai代码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 下一页:自定义BlueKai代码相关的知识,希望对你有一定的参考价值。

<script type="text/javascript">
window._bk_adv = window._bk_adv || {};
window._bk_adv.functions = window._bk_adv.functions || {};
window._bk_adv.data = window._bk_adv.data || {};

// Config
window._bk_adv.data.data_collection_container_id = '44830'; // Replace with container ID for data collection
window._bk_adv.data.json_return_container_id = '54709'; // Replace with container ID for JSON Return Tag
 
// Data to fire
window._bk_adv.functions.bk_async_adv = function() {
  
  // ALLOW MULTIPLE CALLS/SINGLE PAGE APPS
  bk_allow_multiple_calls = true;
  bk_use_multiple_iframes = true;
 
  // Grab Campaign IDs
  bk_addPageCtx('bk_campaign_ids',window._bk_adv.functions.campaign_id_grabber());

  // Send normal vars
  bk_addPageCtx('id', window._bk_adv.functions.readSplitCookie('NextVisitor', 'ID'));
  bk_addPageCtx('category', '{{Category}}');
  bk_addPageCtx('department', '{{Department}}');
   
  
  // Send Data to BlueKai
  BKTAG.doTag(window._bk_adv.data.data_collection_container_id, 4);
  
};
  
// FUNCTION : Read Split Cookie
window._bk_adv.functions.readSplitCookie = function(cookieName, keyName) {
    var nextSessionVariables = readCookie(cookieName);
    if (nextSessionVariables != null) {
        var splitVars = nextSessionVariables.split("&");
        for (var i = 0; i < splitVars.length; i++) {
            var splitKvp = splitVars[i].split("=");
            if (splitKvp != null && splitKvp[0] == keyName)
                return splitKvp[1];
        }
    }
    return null;
}


// FUNCTION : Coretag Loaded
window.bk_async = function(){
 
  if(window._bk_adv.data.jsonretfire){
 
    window._bk_adv.data.coretagfire = true;
    window._bk_adv.functions.bk_async_adv(); // Fire Data
 
  }
 
}
 
// FUNCTION : JSON Return Loaded
window._bk_adv.functions.bk_json_ret = function(){
 
  window._bk_adv.data.jsonretfire = true;
  if(!window._bk_adv.data.coretagfire){
 
    window._bk_adv.functions.bk_async_adv(); // Fire Data
 
  }
 
};
 
// Grab Campaign IDs
window._bk_adv.functions.campaign_id_grabber = function(){
 
  var campaign_ids = [];
  if(window.bk_results && bk_results.campaigns.length !== 0){
    for (var i = 0; i < bk_results.campaigns.length; i++) {
      if(bk_results.campaigns[i].campaign){
        campaign_ids.push(bk_results.campaigns[i].campaign)
      };
    }
  campaign_result = "," + campaign_ids.join(',') + ",";
  return campaign_result;
  }
 
};
 
// JSON Return
(function() {
  var scripts = document.getElementsByTagName('script')[0];
  var bk_json_ret = document.createElement('script'); 
  bk_json_ret.onload = function(){
 
    // Function Code
    window._bk_adv.functions.bk_json_ret();
 
  }
  bk_json_ret.src = '//tags.bluekai.com/site/'+ window._bk_adv.data.json_return_container_id + '?ret=js&limit=1';
  scripts.parentNode.insertBefore(bk_json_ret, scripts);
}());
 
// Coretag.js
(function() {
  var scripts = document.getElementsByTagName('script')[0];
  var s = document.createElement('script');
  s.async = true;
  s.src = '//tags.bkrtx.com/js/bk-coretag.js';
  scripts.parentNode.insertBefore(s, scripts);
}());
</script>

以上是关于html 下一页:自定义BlueKai代码的主要内容,如果未能解决你的问题,请参考以下文章

网页上的“上一页,下一页”JS代码怎么写?

使用 Angular JS 的自定义分页 - 需要在第一页显示 div 元素,这应该在第二页上重复单击下一步

如果不满足条件,则停止前进到下一页

dede自定义表单实现分步提交,也就是可以下一步下一步

asp的 gridview自定义分页 怎么实现这 第2页/共10页 <首页><上一页>1 2 3 4 5 ....<下一页><尾页> 不用插件

使用Spring Boot Starter安全性中的Custom登录页面成功登录,没有进入下一页