Medyanet example CoreTag
window.bk_async = function() {
// ALLOW MULTIPLE CALLS/SINGLE PAGE APPS
bk_allow_multiple_calls= true ; bk_use_multiple_iframes= true ;
//...
// Run the following code in within the "bk_async" function in the BlueKai Tag
// BREADCRUMB GRABBER
// Create BlueKai object
window.bluekai_data = window.bluekai_data || {};
window.bluekai_data.breadcrumb = [];
// Create breadcrumb
var breadcrumb_temp = document.querySelectorAll('span[typeof="v:Breadcrumb"]')
for (var i = 0; i < breadcrumb_temp.length; i++) {
window.bluekai_data.breadcrumb.push(breadcrumb_temp[i].children[0].innerText);
}
window.bluekai_data.breadcrumb.push(document.querySelector('.vw-breadcrumb-item-last').innerHTML);
// Declare phints to BlueKai
for (var i = 0; i < window.bluekai_data.breadcrumb.length; i++) {
bk_addPageCtx('breadcrumb_' + (i+1), window.bluekai_data.breadcrumb[i]);
}
BKTAG.doTag(12345, 4); // you will be supplied with this
};
(function() {
var scripts = document.getElementsByTagName('script')[0];
var s = document.createElement('script');
s.async = true;
s.src = "http://tags.bkrtx.com/js/bk-coretag.js";
scripts.parentNode.insertBefore(s, scripts);
}());