inView.on('firstview', () => { logView(parentTest.id); mediator.emit(parentTest.viewEvent, { componentType: parentTest.componentType, products: initVariant.products, campaignCode, }); mediator.emit( 'register:end', trackingCampaignId ); if (initVariant.showTicker) { initTicker('.js-epic-ticker'); } });
const showBanner = (params: EngagementBannerParams): boolean => { const html = bannerParamsToHtml(params); const messageShown = showBannerAsMessage(messageCode, params, html); if (messageShown) { if (params.bannerShownCallback) { params.bannerShownCallback(); } trackBanner(params); if (params.hasTicker) { initTicker('.js-engagement-banner-ticker'); } return true; } return false; };