html Paysafe:BlueKai CoreTag:GTM建议代码

Posted

tags:

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

<!-- 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;

	//Phint declaring function
	declarePhint = function(varName,dataLayerVar){

		if(dataLayerVar){

			bk_addPageCtx(varName, dataLayerVar);

		}

	}

	// Declare vars
	declarePhint('page_name','{{page_name}}');
	declarePhint('customer_id','{{customer_id}}');
	// ...etc...
	
	// 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]);

	// whitelist params ("starts with") (add more params to this list)
	qsp_whitelist = ["utm_"];

	// query-string param grabber
	for (qsp in urlP){

		for (var i = 0; i < qsp_whitelist.length; i++) {
			
			if (qsp.indexOf(qsp_whitelist[i]) === 0){
				
				bk_addPageCtx('qsp_' + qsp, urlP[qsp]);

			}
		}

	}



	// Send Data 
	BKTAG.doTag(ENTER CONTAINER ID HERE, 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>
<!-- End BlueKai Tag -->

以上是关于html Paysafe:BlueKai CoreTag:GTM建议代码的主要内容,如果未能解决你的问题,请参考以下文章

html poste.it:BlueKai标签

html 下一页:自定义BlueKai代码

html BlueKai:标签管理:Phint Grabber

html 基础媒体:BlueKai像素生成器

html BlueKai:CoreTag代码模板

html 校长海莉:BlueKai标签模板