adform-byko
prepareAdformTracking = function () {
$doc.Req('https://track.adform.net/serving/scripts/trackpoint/',
function() {
if ( body.is('.home') )
{
adf.track(127042,2644052);
}
else if ( $('.co.receipt, .co.reciept').length )
{
var sum = $.trim( $('.total > span').text() );
if ( sum.length ) {
adf.track(127042,2644062,{'sales': sum.replace(/[\D]+/g, '')});
}
}
else
{
var retName = '',
pTitle = $.trim(document.title),
pageId = $.trim( pTitle.split(' | ')[0] ),
sectName = $.trim( $('.snav h2.boxhead').text() ),
subSect = !!($('.snav .level1 > li.current > a').length) ? $.trim( $('.snav .level1 > li.current > a').text() )
: $.trim( $('.snav .level1 > li.parent > a').text() );
// assumes there always are sectName & subSect (except on .home)
retName += '|' + sectName + '|' + subSect + (( pageId !== subSect ) ? ('|' + pageId ) : '');
adf.Params.PageName = encodeURIComponent('kvittun');
adf.Params.Divider = encodeURIComponent('|');
adf.track(127042);
}
});
}