Tag: Code Inspection

5 years ago • 4 min read time

In an ongoing battle to remain productive while delivering quality code, we are always on the lookout for the practices that help us do our best work. Code inspection plays…

_linkedin_partner_id = "1099705"; window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(_linkedin_partner_id); (function(){var s = document.getElementsByTagName("script")[0]; var b = document.createElement("script"); b.type = "text/javascript";b.async = true; b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; s.parentNode.insertBefore(b, s);})(); document.addEventListener('scroll', function(){ // Sending custom scrolling event to Analytics panel for every 10% page is scrolled // Source: https://growthrocks.com/blog/scroll-tracking-google-analytics/ var h = document.documentElement, b = document.body, st = 'scrollTop', sh = 'scrollHeight'; var percent = parseInt ( (h[st]||b[st]) / ((h[sh]||b[sh]) - h.clientHeight) * 100); if (percent == 10) { ga('send', 'event', 'Scrolling', 'moreThan10%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 20) { ga('send', 'event', 'Scrolling', 'moreThan20%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 30) { ga('send', 'event', 'Scrolling', 'moreThan30%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 40) { ga('send', 'event', 'Scrolling', 'moreThan40%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 50) { ga('send', 'event', 'Scrolling', 'moreThan50%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 60) { ga('send', 'event', 'Scrolling', 'moreThan60%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 70) { ga('send', 'event', 'Scrolling', 'moreThan70%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 80) { ga('send', 'event', 'Scrolling', 'moreThan80%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 90) { ga('send', 'event', 'Scrolling', 'moreThan90%', '{{Page URL}}', { 'nonInteraction': 1 }); } else if (percent == 90) { ga('send', 'event', 'Scrolling', 'moreThan90%', '{{Page URL}}', { 'nonInteraction': 1 }); } }); !function(f,b,e,v,n,t,s) {if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)}; if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s)}(window, document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '464881160848254'); fbq('track', 'PageView');