html 广告系列网站:基本标记w社交跟踪

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 广告系列网站:基本标记w社交跟踪相关的知识,希望对你有一定的参考价值。


<!-- If hard-coding - paste in the <body> of the page (ideally just below opening <body> tag  -->
<!-- If implementing via GTM - trigger on DOM Ready  -->

<!--­ Begin BlueKai Tag ­­-->
<script type="text/javascript">
window.bk_async = function() {

	// ALLOW MULTIPLE CALLS/SINGLE PAGE APPS
	bk_allow_multiple_calls=true; bk_use_multiple_iframes=true;

	// Grab Query-String Parameters // grab from urlP["nameofparameter"], e.g. urlP["email_id"]
	var urlP;
	var match,
		pl = /\+/g, // Regex for replacing addition symbol with a space
		search = /([^&=]+)=?([^&]*)/g,
		decode = function(s) {
			return decodeURIComponent(s.replace(pl, " "));
		},
		query = window.location.search.substring(1);

	urlP = {};
	while (match = search.exec(query))
		urlP[decode(match[1]).toLowerCase()] = decode(match[2]);

	 // <optional> PHINTS : Declare variables about this page (or user)

	 // CUSTOM VARS YOU WANT TO DECLARE : Uncomment this to declare specific vars
	 
	 //bk_addPageCtx('change_to_var_name','{{GTM Var Name}}'); // Key must only use (a-z,A-Z,0-9,_) characters. Value can be anything

	 // bk_addPageCtx('brand_name','pepsi'); // An example	 
	 // bk_addPageCtx('brand_name','{{brand name}}'); // An example	(using GTM vars)

	// MD5 hashed email grabber	
	if(urlP.e_id_m){
		bk_addPageCtx('e_id_m', urlP.e_id_m)
		BKTAG.doTag(46295, 4);
	};


	// Send Data 
	BKTAG.doTag(46335, 4);
};
(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>


<!--­ BlueKai - Social Auto-Tracking ­­- Start -->
<script type="text/javascript">
if(window.jQuery && jQuery.fn && jQuery.fn.jquery){

	// FUNCTION : Link Tracking Function : DO NOT CHANGE
	var add_link_tracking = function(social_keyword,social_network_name){

		jQuery('a[href*="' + social_keyword + '"]').mousedown(function(event_data){

		bk_addPageCtx('event_type','social link click');
		bk_addPageCtx('social_network',social_network_name);
		bk_addPageCtx('event_detail',this.href);
		BKTAG.doTag(46335, 4);
		})

	}

	// Add social networks here
	add_link_tracking("twitter","twitter");	// search keyword in link URL, name of social network to pass to BlueKai
	add_link_tracking("facebook","facebook"); // etc
	add_link_tracking("youtube","youtube"); // etc
	add_link_tracking("instagram","instagram"); // etc
	add_link_tracking("websta.me","instagram"); // etc
	
}
</script>
<!--­ BlueKai - Social Auto-Tracking - End ­­-->

以上是关于html 广告系列网站:基本标记w社交跟踪的主要内容,如果未能解决你的问题,请参考以下文章

如何通过脚本停止 AdWords 广告系列?

流量运营指标扫盲

iOS - 跟踪我的安装来自哪些广告系列 [重复]

来自 Adwords 广告系列的 GA 事件中的每次获取成本?

使用数据库和社交网站登录

移动社交广告价值显现,腾讯之后,陌陌开始捞金