roshanoracle
3/15/2018 - 1:39 PM

Fundamental Media : BlueKai Pixel Generator

<!--­ Begin BlueKai Pixel ­­-->
<script type="text/javascript">
(function() {

	// Config
	var containerID = "REPLACEWITHCONTAINERID";
	var bkLimit = 1;
	
	// Add phints as Query-String Params
	var bkQsp = []
	bkQsp.push("phint=__bk_l%3D" + encodeURIComponent(document.location.href));
	bkQsp.push("phint=url_1%3D" + encodeURIComponent(document.location.href));
	bkQsp.push("phint=url_2%3D" + encodeURIComponent(document.location.href));
	bkQsp.push("phint=url_3%3D" + encodeURIComponent(document.location.href));
	bkQsp.push("phint=domain_1%3D" + encodeURIComponent(document.domain));
	bkQsp.push("phint=domain_2%3D" + encodeURIComponent(document.domain));
	bkQsp.push("phint=domain_3%3D" + encodeURIComponent(document.domain));
	bkQsp.push("phint=pathname_1%3D" + encodeURIComponent(document.location.pathname));
	bkQsp.push("phint=pathname_2%3D" + encodeURIComponent(document.location.pathname));
	bkQsp.push("phint=pathname_3%3D" + encodeURIComponent(document.location.pathname));
	bkQsp.push("phint=query_string_1%3D" + encodeURIComponent(document.location.search));
	bkQsp.push("phint=query_string_2%3D" + encodeURIComponent(document.location.search));
	bkQsp.push("phint=query_string_3%3D" + encodeURIComponent(document.location.search));

	// Pixel config
	cacheBuster = parseInt(Math.random() * 10000000000000000);
	var bkUrl = "//tags.bluekai.com/site/" + containerID + "?limit=" + bkLimit + "&r=" + cacheBuster + "&";
	var bkRequest = bkUrl + bkQsp.join("&");

	// Generate pixel
	var bkPixel = new Image();
	bkPixel.height = "1";
	bkPixel.width = "1";
	bkPixel.style = "display: none;";
	bkPixel.src = bkRequest;
})()
</script>
<!--­­ End BlueKai Pixel ­-->