Script Examples

Logging navigation on a Single Page Website

var triggerbeeCustom = triggerbeeCustom || (function () {
function init() {
// Custom logging for features logos
$('.navbar-nav li a').click(function () {
logEvent($(this));
});
}

function logEvent($element)
{
var url = '/' + $element.attr('href');
url = url.replace(/#/,"");
var title = $element.text();
mtr.log(url, title);
}

init(); // Init on load
return {

};
})();