javascript BlueKai CoreTag - 付费与自然搜索
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript BlueKai CoreTag - 付费与自然搜索相关的知识,希望对你有一定的参考价值。
// FUNCTION : Search Checker
window._bk = window._bk || {};
window._bk.functions = window._bk.functions || {};
window._bk.functions.searchChecker = function() {
// Check paid
var paid = false;
if (document.location.href.indexOf('gclid=') > -1) {
paid = true;
}
// Check search engine
var search_engine_flag = false;
var search_type = "none";
var search_engine = "none";
if (document.referrer.indexOf('.google.') > -1) {
search_engine_flag = true;
search_engine = "google";
}
if (document.referrer.indexOf('.bing.') > -1) {
search_engine_flag = true;
search_engine = "bing";
}
if (document.referrer.indexOf('.yahoo.') > -1) {
search_engine_flag = true;
search_engine = "yahoo";
}
if (search_engine_flag && paid) {
search_type = "paid search"
};
if (search_engine_flag && !paid) {
search_type = "natural search"
};
return {
search_type: search_type,
paid: paid,
search_engine: search_engine,
search_engine_flag: search_engine_flag
}
}
// Paid & Search Checker
bk_addPageCtx("search_type", window._bk.functions.searchChecker().search_type);
bk_addPageCtx("search_engine", window._bk.functions.searchChecker().search_engine);
bk_addPageCtx("paid", window._bk.functions.searchChecker().paid);
以上是关于javascript BlueKai CoreTag - 付费与自然搜索的主要内容,如果未能解决你的问题,请参考以下文章
javascript BlueKai CoreTag - 元数据
javascript BlueKai:VWO代码:TEMPLATE
javascript 优化X:BlueKai(同步)
javascript BlueKai - 离线匹配检查器
javascript Caxton CTP:BlueKai CoreTag:模板
javascript 优化X:BlueKai集成(异步):等待CoreTag