1 2function getSiteId(){let currentHost=window.location.host;let currentPath=window.location.pathname;let siteId;if(currentHost.indexOf("-www.nordbayern.de")!==-1||currentHost.indexOf("ssotest.nordbayern.de")!==-1){siteId=583659;}else if(currentHost.indexOf("-www.christkindlesmarkt.de")!==-1){siteId=currentPath.indexOf("/en/")!==-1?588675:588671;}else if(currentHost.indexOf("-www.nn.de")!==-1){siteId=621490;}else if(currentHost.indexOf(".nordbayern.de")!==-1||currentHost.indexOf("www.findajob.de")!==-1||currentHost.indexOf("www.bardentreffen.de")!==-1||currentHost.indexOf("nordbayern.immowelt.de")!==-1){siteId=584938;}else if(currentHost.indexOf(".christkindlesmarkt.de")!==-1){siteId=currentPath.indexOf("/en/")!==-1?588679:588670;}else if(currentHost.indexOf(".nn.de")!==-1){siteId=621489;}else if(currentPath.indexOf("/bier/")!==-1){siteId=588666;}else if(currentPath.indexOf("/ckm/en/")!==-1){siteId=588675;}else if(currentPath.indexOf("/ckm/")!==-1){siteId=588671;}else if(currentPath.indexOf("/nn/")!==-1){siteId=621490;}else{siteId=583659;} 3return siteId;} 4function getPlatform(){try{if(window.matchMedia('(max-width: 1023px)').matches){return'Mobilesite';}}catch(e){} 5return'Website';} 6function buildTrackingInfoJson(trackingInfoJson){trackingInfoJson.platform=getPlatform();if(isNN||isNB){trackingInfoJson.user_status=getSubscriptionStatus();trackingInfoJson.active_term=getActiveTerms();} 7trackingInfoJson.url=document.location.href.split("//")[1];if(trackingInfoJson.referrer===''||trackingInfoJson.referrer===undefined){trackingInfoJson.referrer=document.referrer.split("//")[1];} 8return trackingInfoJson;} 9let trackAudioEvents=function(playerIdentfifier,headline){let audioPlayer=document.querySelector(playerIdentfifier);audioPlayer.addEventListener('playing',function(){trackClickEvent({'click':'Play: '+headline});});audioPlayer.addEventListener('pause',function(){if(audioPlayer.currentTime!==audioPlayer.duration){trackClickEvent({'click':'Pause: '+headline});}});} 10function trackClickEvent(eventData,clickEventName){eventData=Object.assign({},window.trackingInfoJson,eventData);eventData['user_status']=typeof getSubscriptionStatus==="function"?getSubscriptionStatus():"anon";pa?.sendEvent(clickEventName||'click.action',eventData);} 11function trackExtendedClickEvent(clickName,chapter1,targetType,targetUrl,clickEventName){trackClickEvent({'click':clickName,'click_chapter1':chapter1,'click_target_type':targetType,'click_target_url':targetUrl},clickEventName);} 12function trackClickEventForFavorite(remove,favoriteId){const requestParameters={id:favoriteId};fetch(linkPrefix+'/system-api/tracking-info?'+new URLSearchParams(requestParameters).toString(),{credentials:"include",method:'get'}).then(function(response){if(response.status!==200) 13throw new Error();return response.json();}).then(function(trackingInfo){trackClickEvent({'click':(remove?'Remove':'Add')+' Favourite','favourite_content_name':trackingInfo.contentName,'favourite_content_type':trackingInfo.contentType});}).catch(function(err){console.warn('Could not get tracking-info.',err);});} 14function trackClickEventForNavigation(clickLocation,linkText,targetType,targetUrl,clickEventName){trackExtendedClickEvent('Navigation '+clickLocation+' Click',linkText,targetType,targetUrl,clickEventName)} 15function trackClickEventForTeaserModule(moduleTitle,contentType,targetUrl){trackExtendedClickEvent('Teasermodule Teaser Click',moduleTitle,contentType,targetUrl)} 16function trackClickEventForLink(clickName,linkText,contentType,targetUrl,linkingContentId,linkingTitle){contentType=contentType||'external website';if(contentType==='page'){contentType='ressort';} 17const eventData={'click':clickName,'click_chapter1':linkText,'click_target_type':contentType,'click_target_url':targetUrl,'content_id':linkingContentId};if(linkingTitle){eventData['artikel']=linkingTitle;} 18trackClickEvent(eventData,contentType==='external website'?'click.exit':undefined);} 19function trackClickEventForCollectiveBox(teaserModuleTitle,collectiveBoxTitle,swipeElementTitle,targetUrl){trackClickEvent({'click':'Kollektivbox Click','click_chapter1':teaserModuleTitle,'click_chapter2':collectiveBoxTitle,'click_chapter3':swipeElementTitle,'click_target_url':targetUrl},undefined);} 20function trackSearchEvent(searchCount,searchQuery){pa?.sendEvent('internal_search_result.display',{'ise_keyword':searchQuery,'ise_page':searchCount});} 21function trackVideoEvents(dmPlayer,headline){dmPlayer.on(dailymotion.events.VIDEO_PLAY,function(){trackClickEvent({'click':'Play: '+headline});});dmPlayer.on(dailymotion.events.VIDEO_PAUSE,function(state){if(state.videoTime!==state.videoDuration){trackClickEvent({'click':'Pause: '+headline});}});} 22function initPianoScrollTracking(){const mainElement=document.querySelector('main');const stickyHeaderElement=document.getElementById('nav__head');if(!mainElement||!stickyHeaderElement){return;} 23const SCROLL_MILESTONES=[25,50,75,100];const DETAIL_CONTENT_TYPES=["article","gallery"];const reachedMilestones=new Set();const debounce=(func,delay)=>{let timeout;return()=>{clearTimeout(timeout);timeout=setTimeout(func,delay);};};const debouncedTrackScrollMilestones=debounce(trackScrollMilestones,200);function calculateEditorialContentHeight(){if(DETAIL_CONTENT_TYPES.includes(contentType)){const richtextSections=document.querySelectorAll('section.article__richtext');const editorialContentElement=richtextSections[richtextSections.length-1];if(editorialContentElement){const editorialContentLeadHeight=editorialContentElement.offsetTop-mainElement.offsetTop;return editorialContentLeadHeight+editorialContentElement.scrollHeight;}}else{return mainElement.scrollHeight;}} 24function calculateContentSeenPercentage(editorialContentHeight){const topShift=Math.max(stickyHeaderElement.scrollHeight,mainElement.offsetTop-window.scrollY);
24const viewportHeight=window.innerHeight-topShift;const scrollY=Math.max(0,window.scrollY-mainElement.offsetTop+stickyHeaderElement.scrollHeight);const totalSeenHeight=Math.min(scrollY+viewportHeight,editorialContentHeight);return(totalSeenHeight/editorialContentHeight)*100;} 25function trackScrollMilestones(){const editorialContentHeight=calculateEditorialContentHeight();if(editorialContentHeight){const contentSeenPercentage=calculateContentSeenPercentage(editorialContentHeight);SCROLL_MILESTONES.forEach((milestone)=>{if(contentSeenPercentage>=milestone&&!reachedMilestones.has(milestone)){reachedMilestones.add(milestone);pa?.sendEvent('page.scroll',{'scroll_rate':milestone});if(milestone===100){window.removeEventListener("scroll",debouncedTrackScrollMilestones);}}});}} 26window.addEventListener("scroll",debouncedTrackScrollMilestones);} 27async function initGlomexIntegrationTracking(identifier){const integration=document.querySelector('glomex-integration[data-id="'+identifier+'"]');await window.customElements.whenDefined('glomex-integration');const{IntegrationEvent}=integration.constructor;const glomexTrackEvents=[IntegrationEvent.AD_CLICK,IntegrationEvent.AD_IMPRESSION,IntegrationEvent.AD_COMPLETE,IntegrationEvent.CONTENT_START,IntegrationEvent.CONTENT_STOP,IntegrationEvent.CONTENT_ENDED,IntegrationEvent.CONTENT_PAUSE,IntegrationEvent.CONTENT_PLAY];glomexTrackEvents.forEach(function(e){integration.addEventListener(e,()=>{sendGlomexTrackingEvent(e);});});function sendGlomexTrackingEvent(eventName){pa?.sendEvent("glomex."+eventName,{'glomex_video_title':integration.content.title});}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.