function oxDone() { var gads = document.createElement('script'), useSSL = 'https:' === document.location.protocol, node = document.getElementsByTagName('script')[0]; gads.async = true; gads.type = 'text/javascript'; gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; node.parentNode.insertBefore(gads, node); } setTimeout(function() { if (!('OX' in window || 'oxhbjs' in window)) { oxDone(); } }, 2500); (function() { var openx = document.createElement('script'), useSSL = 'https:' === document.location.protocol, node = document.getElementsByTagName('script')[0]; openx.async = true; openx.type = 'text/javascript'; openx.src = (useSSL ? 'https:' : 'http:') + '//lovetk-d.openx.net/w/1.0/jstag?nc=1004147-LoveToKnow'; node.parentNode.insertBefore(openx, node); })(); ltk.ads = { retries: [], contentUnit: '', debug: false, refreshInterval: 25000, excludedIds: ['ad-carambola-desktop', 'ad-carambola-mobile'], slots: [], numOxSlotsDefined: 0, define: function(id, unit, size, sizes, delay) { var help = this.helpers, debug = this.debug; var sizeDef = size; googletag.cmd.push(function() { if (sizeDef.length === 0) { sizeDef = help.getMaxSizeArr(sizes); } if (sizeDef.length) { if (debug) help.title('define'); var def = googletag.defineSlot('/1004147/' + unit, sizeDef, id) .addService(googletag.pubads()); if (ltk.ads.debug) help.logDeep('define unit: ' + unit + ' for ' + id); if (help.isOxAd(id)) { ltk.ads.numOxSlotsDefined++; if (ltk.ads.numOxSlotsDefined === OX_dfp_ads.length) { OX.dfp_bidder.setOxTargeting(); } if (debug) help.logDeep('set OX target: ' + sizeDef[0] + 'x' + sizeDef[1] + ' for ' + unit); } ltk.ads.slots.push({ id: id, ad: def, visible: false, firstRefresh: true, timer: { state: 'stopped', counter: (ltk.ads.refreshInterval / 1000), isStopped: function() { return this.state === 'stopped'; }, isPaused: function() { return this.state === 'paused'; }, isActive: function() { return this.state === 'active'; }, getState: function() { return this.state; }, pause: function() { this.state = 'paused'; if (debug) help.logTimerPaused('pause timer for ' + id + ': ' + help.getSlotById(id).timer.state); }, resume: function() { this.state = 'active'; if (this.counter <= 1) this.counter++; // make sure we have a minimum impression time of 1 sec if (debug) help.logTimerPaused('resume timer for ' + id + ': ' + help.getSlotById(id).timer.state); }, startTimer: function(slot) { this.state = 'active'; // set to a property in case we need to clear it slot.timer.interval = setInterval(function() { if (!slot.timer.isPaused() && !slot.timer.isStopped() && slot.visible) { if (debug) help.logTimer('refresh ' + id + ' in ' + slot.timer.counter + ' seconds'); slot.timer.counter--; } else { if (debug) help.logTimerPaused('remain paused for ' + id); } if (slot.timer.counter < 0) { ltk.ads.refresh(slot.id); slot.timer.counter = (ltk.ads.refreshInterval / 1000); } }, 1000); } } }); googletag.display(id); // needed only for wrangling sticky ads on load if (debug) help.logDeep('pre-render the ad so sticky ads actually stick'); if (!delay) { if (debug) help.logDeep('see no delay, so request initial fetch and display of the ad'); ltk.ads.refresh(id); } } }); }, refresh: function(id) { var help = this.helpers, debug = this.debug; if (debug) { help.title('refresh'); } googletag.cmd.push(function() { var ad_slot = help.getSlotById(id), ad = ad_slot.ad; if (!ad_slot.firstRefresh && help.isAdOldEnough(ad_slot) === false) { var age = (((new Date()) - ad_slot.timer.last) / 1000); if (debug) { console.log( '%cNot refreshing ... ' + ad_slot.id + ' is only ' + age + ' seconds old', 'background:red;color:white;' ); } return; } if (!ad_slot.firstRefresh && !ad_slot.visible) return; // we won't refresh unless we're visible to google if (help.isOxAd(ad_slot)) { if (debug) help.log('refresh the OX DFP ad for ' + id); OX.dfp_bidder.refresh(function() { OX.dfp_bidder.setOxTargeting([ad]); googletag.pubads().refresh([ad]); }); } else { if (debug) help.log('refresh the non-OX ad ' + id); googletag.pubads().refresh([ad]); } }); }, listen: function(name, handler) { googletag.cmd.push(function() { googletag.pubads().addEventListener(name, handler); }); }, handleImpressionViewable: function(event) { var help = ltk.ads.helpers, debug = ltk.ads.debug; var id = event.slot.getSlotElementId(), slot = help.getSlotById(id); if (debug) { help.title('impressionViewable'); help.logDeep('see event triggered for ' + id); } slot.visible = true; if (slot.timer.isStopped()) { if (debug) help.logDeep('am starting the timer'); slot.timer.startTimer(); return; } if (slot.timer.isPaused()) { if (debug) help.logDeep('am resuming the timer'); slot.timer.resume(); } }, handleSlotRenderEnded: function(event) { var help = ltk.ads.helpers, debug = ltk.ads.debug; if (debug) { help.title('slotRenderEnded'); help.logDeep('see event triggered for ' + event.slot.getSlotElementId()); } var slot = help.getSlotById(event.slot.getSlotElementId()); if (slot.firstRefresh === true) slot.firstRefresh = false; slot.timer.last = new Date(); if (slot.visible && slot.timer.isStopped()) { if (debug) help.logDeep('am starting the timer'); slot.timer.startTimer(); return; } if (slot.visible && slot.timer.isPaused()) { if (debug) help.logDeep('am resuming the timer'); slot.timer.resume(); } }, handleSlotVisibilityChanged: function(event) { var help = ltk.ads.helpers, debug = ltk.ads.debug; var id = event.slot.getSlotElementId(), perc = event.inViewPercentage, slot = help.getSlotById(id), wasVisible = slot.visible; if (!help.isValidAd(slot)) return; if (debug) { help.title('slotVisiblityChanged'); help.logDeep('see that slotVisibilityChanged was triggered for ' + id); } slot.visible = perc < 50 ? false : true; // same criteria as 'impressionViewable' event var changedOn = !wasVisible && slot.visible, changedOff = wasVisible && !slot.visible; if (debug) { help.logDeep('see that ad was ' + (wasVisible ? 'visible ' : 'not visible ') + 'and is now ' + (slot.visible ? 'visible' : 'not visible')); help.logDeep('see that ' + id + ' has timer as: ' + slot.timer.getState()); } if (changedOn && slot.timer.isStopped()) { if (debug) help.logDeep('am starting the timer'); slot.timer.startTimer(slot); return; } if (changedOn && slot.timer.isPaused()) { if (debug) help.logDeep('am resuming the timer'); slot.timer.resume(); return; } if (changedOff && slot.timer.isActive()) { if (debug) help.logDeep('am pausing the timer'); slot.timer.pause(); } }, helpers: { getMaxSizeArr: function(arr) { var len = arr.length, i = len - 1, retArr = []; for (; i >= 0; i--) { var minVpSize = arr[i][0], minVpWidth = minVpSize[0], minVpHeight = minVpSize[1], allowedAdSizes = arr[i][1]; if (window.innerWidth >= minVpWidth && window.innerHeight >= minVpHeight) { retArr = allowedAdSizes; break; } } return retArr; }, getSlotById: function(id) { for (var i = 0; i < ltk.ads.slots.length; i++) { if (ltk.ads.slots[i].id === id) return ltk.ads.slots[i]; } }, isOxAd: function(ad_slot) { for (var i = 0; i < OX_dfp_ads.length; i++) { if (OX_dfp_ads[i][2] === ad_slot.id) return true; } return false; }, isValidAd: function(ad_slot) { for (var i = 0; i < ltk.ads.excludedIds.length; i++) { if (ad_slot.id === ltk.ads.excludedIds[i]) return false; } return true; }, isAdOldEnough: function(ad_slot) { var timeSpan = Math.ceil(((new Date()) - ad_slot.timer.last) / 1000); var min = Math.ceil(ltk.ads.refreshInterval / 1000); if (timeSpan >= min) { if (ltk.ads.debug) { ltk.ads.helpers.log( 'see that ' + ad_slot.id + ' was refreshed ' + timeSpan + ' seconds ago' ); } return true; } return false; }, title: function(str) { console.log( '%c' + ltk.ads.helpers.getTime() + ' ' + str, 'background:black;color:white;font-weight:bold' ); }, titleDeep: function(str) { console.log( '%c' + ltk.ads.helpers.getTime() + ' ' + str, 'background:black;color:white;font-weight:bold' ); }, log: function(str) { console.log( '%c' + ltk.ads.helpers.getTime() + ' I: ' + '%c' + str, 'background:black;color:orchid;font-weight:bold', 'background:black;color:limegreen;font-weight:bold' ); }, logDeep: function(str) { console.log( '%c' + ltk.ads.helpers.getTime() + ' I: ' + '%c' + str, 'background:black;color:orchid;font-weight:bold', 'background:black;color:limegreen;font-weight:bold' ); }, logTimer: function(str) { console.log('%cI will ' + str, 'background:orange;color:red'); }, logTimerPaused: function(str) { console.log('%cI ' + str, 'background:green;color:white;font-weight:bold'); }, getTime: function() { var d = new Date(), h = d.getHours() + '', m = d.getMinutes() + '', s = d.getSeconds() + ''; h = h.length < 2 ? ('0' + h) : h; m = m.length < 2 ? ('0' + m) : m; s = s.length < 2 ? ('0' + s) : s; return h + ':' + m + ':' + s; } } } googletag.cmd.push(function() { var pubads = googletag.pubads(); pubads.set('page_url', location.href); pubads.collapseEmptyDivs(); pubads.enableSingleRequest(); pubads.disableInitialLoad(); googletag.enableServices(); }); if (ltk.type !== 'Slideshow') { ltk.ads.listen('impressionViewable', ltk.ads.handleImpressionViewable); ltk.ads.listen('slotVisibilityChanged', ltk.ads.handleSlotVisibilityChanged); } ltk.ads.listen('slotRenderEnded', ltk.ads.handleSlotRenderEnded); Home Based Business

Home Based Business

Article Highlight: Best Home Based Businesses for Women

According to a Pew Research study, "women are much more likely than men to experience a variety of family-related career interruptions," leading to a need for flexible careers. This may explain why the idea of… Keep reading »

Browse Topics in Home Based Business

Woman working online from home

If you own, or are thinking about starting, a home-based business, LoveToKnow Business has a wealth of information that can be helpful to you. Whether you're looking for tips that can help you get started or you're an established entrepreneur ready to take your business to the next level, the expert suggestions provided here can be invaluable tools for your path to success.

Getting Started

Starting out as a new home business owner can seem overwhelming, but the process can be manageable - and rewarding - if you have the right information.

Success Tips

Building a successful business is an ongoing process that requires continual learning and planning.

Building Your Business

When you're focused on building a business, you can expect to face new challenges on a regular basis. Any time you're in need of information or are looking for inspiration, let LoveToKnow Business be the first online resource you visit. The expert writers and editors are always updating and adding content, so you'll likely find plenty of new and helpful information every time you stop by.

Home Based Business