### Initialize Matomo Analytics Source: https://www.zycus.com/customers/success-story/global-energy-storage-solutions-onboards-zycus-source-to-contract-suite/ Initializes Matomo (formerly Piwik) analytics tracking. It pushes a start time event and loads the Matomo container script from zycus.info. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g,s); })(); ``` -------------------------------- ### Initialize Matomo Analytics Source: https://www.zycus.com/knowledge-hub/whitepapers/6-attributes-of-a-best-in-class-accounts-payable-operation Initializes Matomo (formerly Piwik) analytics by pushing a start time event. It then asynchronously loads the Matomo container script. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = 'https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g, s); })(); ``` -------------------------------- ### Matomo Analytics Initialization Source: https://www.zycus.com/blog/supplier-management/automated-master-data-management-mdm Initializes Matomo analytics by pushing the start time and a 'mtm.Start' event to the tracking array. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/procure-to-pay/procure-to-pay-software-solutions-in-the-philippines Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Amplitude Analytics Initialization Source: https://www.zycus.com/blog/procure-to-pay/procure-to-pay-software-solutions-in-the-philippines Initializes the Amplitude analytics SDK with a specified API key and configuration options. It enables features like fetching remote configurations and autocapture of events. ```javascript window.amplitude.add(window.sessionReplay.plugin({sampleRate: 1})); window.amplitude.init('2ee18d3b568c8a962d7edb99cb435db9', {"fetchRemoteConfig":true,"autocapture":true}); ``` -------------------------------- ### Author Box Alignment Source: https://www.zycus.com/blog/ai-agents/gen-ai-agents-for-contract-management Ensures that list items within the author box component are aligned to the start of the content area. ```css #authorbox-m .pp-multiple-authors-layout-boxed ul li { align-content: flex-start !important; } ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/generative-ai/top-generative-ai-platforms-in-procurement Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Matomo (MTM) Analytics Initialization Source: https://www.zycus.com/blog/ai-agents/gen-ai-agents-for-contract-management Initializes the Matomo (MTM) analytics tracking script. This code snippet loads the analytics container and starts the tracking process. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = 'https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g, s); })(); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/customers/success-story/global-energy-storage-solutions-onboards-zycus-source-to-contract-suite/ Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/ai-agents/gen-ai-agents-for-contract-management Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Amplitude Analytics Initialization Source: https://www.zycus.com/blog/supplier-management/riding-the-digital-wave-the-evolution-of-supplier-risk-management-in-procurement Initializes the Amplitude analytics SDK with a specified API key and configuration options. It enables features like fetching remote configurations and autocapture of events. ```javascript window.amplitude.add(window.sessionReplay.plugin({sampleRate: 1})); window.amplitude.init('2ee18d3b568c8a962d7edb99cb435db9', {"fetchRemoteConfig":true,"autocapture":true}); ``` -------------------------------- ### Zycus Analytics Initialization Source: https://www.zycus.com/blog/generative-ai/top-generative-ai-platforms-in-procurement Initializes Matomo (MTM) tracking for Zycus, recording the start time and asynchronously loading the analytics container script. This ensures website analytics are captured. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g,s); })(); ``` -------------------------------- ### Matomo (MTM) Analytics Script Load Source: https://www.zycus.com/blog/supplier-management/riding-the-digital-wave-the-evolution-of-supplier-risk-management-in-procurement Loads the Matomo (MTM) analytics script for website tracking. It initializes the tracking start time and asynchronously loads the container script. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g,s); })(); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/supplier-management/riding-the-digital-wave-the-evolution-of-supplier-risk-management-in-procurement Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Matomo (MTM) Analytics Initialization Source: https://www.zycus.com/customers/success-story/a-leading-engineering-procurement-and-construction-company-in-us-partnered-with-zycus Initializes Matomo (formerly Piwik) analytics tracking. It records the start time of the tracking session and asynchronously loads the Matomo JavaScript container. ```javascript var _mtm = window._mtm = window._mtm || []; _mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'}); (function() { var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src='https://zycus.info/analytics/js/container_WFiBgfe6.js'; s.parentNode.insertBefore(g,s); })(); ``` -------------------------------- ### VWO Initialization and Core Logic Source: https://www.zycus.com/blog/procure-to-pay/procure-to-pay-software-solutions-in-the-philippines This snippet contains the core JavaScript code for initializing Visual Website Optimizer (VWO). It includes functions for loading scripts, managing settings, and initiating the VWO tracking process on the page. It relies on external variables like 'account_id' and 'version'. ```javascript var _vwo_code = {}; (function() { var d = document; var w = window; var cK = "_vis_opt_settings_cookie"; var c = "_vis_opt_exp_cookie"; var v = null; var stT = window.localStorage; var account_id = 123456; // Example account_id var version = "1.0"; // Example version _vwo_code.finish = function(e) { if (e) { var t = d.createElement('img'); t.src = 'https://dev.visualwebsiteoptimizer.com/ee.gif?a=' + account_id + e; t.style.display = 'none'; d.body.appendChild(t); } return false; }; _vwo_code.addScript = function(e) { var t = d.createElement('script'); t.type = 'text/javascript'; if (e.src) { t.src = e.src; } else { t.text = e.text; } v && t.setAttribute('nonce', v.nonce); d.getElementsByTagName('head')[0].appendChild(t); }; _vwo_code.load = function(e, t) { var n = this.getSettings(); var i = d.createElement('script'); var r = this; t = t || {}; if (n) { i.textContent = n; d.getElementsByTagName('head')[0].appendChild(i); if (!w.VWO || VWO.caE) { stT.removeItem(cK); r.load(e); } } else { var o = new XMLHttpRequest(); o.open('GET', e, true); o.withCredentials = !t.dSC; o.responseType = t.responseType || 'text'; o.onload = function() { if (t.onloadCb) { return t.onloadCb(o, e); } if (o.status === 200 || o.status === 304) { _vwo_code.addScript({ text: o.responseText }); } else { _vwo_code.finish('&e=loading_failure:' + e); } }; o.onerror = function() { if (t.onerrorCb) { return t.onerrorCb(e); } _vwo_code.finish('&e=loading_failure:' + e); }; o.send(); } }; _vwo_code.getSettings = function() { try { var e = stT.getItem(cK); if (!e) { return; } e = JSON.parse(e); if (Date.now() > e.e) { stT.removeItem(cK); return; } return e.s; } catch (e) { return; } }; _vwo_code.init = function() { if (d.URL.indexOf('__vwo__disable__') > -1) return; var e = this.settings_tolerance(); w._vwo_settings_timer = setTimeout(function() { _vwo_code.finish(); stT.removeItem(cK); }, e); var t; if (this.hide_element() !== 'body') { t = d.createElement('style'); var n = this.hide_element(), i = n ? n + this.hide_element_style() : '', r = d.getElementsByTagName('head')[0]; t.setAttribute('id', '_vis_opt_path_hides'); v && t.setAttribute('nonce', v.nonce); t.setAttribute('type', 'text/css'); if (t.styleSheet) t.styleSheet.cssText = i; else t.appendChild(d.createTextNode(i)); r.appendChild(t); } else { t = d.getElementsByTagName('head')[0]; var i = d.createElement('div'); i.style.cssText = 'z-index: 2147483647 !important;position: fixed !important;left: 0 !important;top: 0 !important;width: 100% !important;height: 100% !important;background: white !important;display: block !important;'; i.setAttribute('id', '_vis_opt_path_hides'); i.classList.add('_vis_hide_layer'); t.parentNode.insertBefore(i, t.nextSibling); } var o = window._vis_opt_url || d.URL, s = 'https://dev.visualwebsiteoptimizer.com/j.php?a=' + account_id + '&u=' + encodeURIComponent(o) + '&vn=' + version; if (w.location.search.indexOf('_vwo_xhr') !== -1) { this.addScript({ src: s }); } else { this.load(s + '&x=true'); } }; // Placeholder for settings_tolerance and hide_element methods if they were defined elsewhere _vwo_code.settings_tolerance = function() { return 5000; }; // Default tolerance _vwo_code.hide_element = function() { return 'body'; }; // Default hide element _vwo_code.hide_element_style = function() { return 'body { visibility: hidden !important; }'; }; // Default style w._vwo_code = _vwo_code; _vwo_code.init(); })(); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/generative-ai/top-generative-ai-platforms-in-procurement Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### Amplitude Analytics Initialization Source: https://www.zycus.com/customers/success-story/global-energy-storage-solutions-onboards-zycus-source-to-contract-suite/ Initializes the Amplitude analytics SDK with a specified API key and configuration options. It enables features like fetching remote configurations and autocapture of events. ```javascript window.amplitude.add(window.sessionReplay.plugin({sampleRate: 1})); window.amplitude.init('2ee18d3b568c8a962d7edb99cb435db9', {"fetchRemoteConfig":true,"autocapture":true}); ``` -------------------------------- ### VWO Initialization and Core Logic Source: https://www.zycus.com/blog/supplier-management/riding-the-digital-wave-the-evolution-of-supplier-risk-management-in-procurement This snippet contains the core JavaScript code for initializing Visual Website Optimizer (VWO). It includes functions for loading scripts, managing settings, and initiating the VWO tracking process on the page. It relies on external variables like 'account_id' and 'version'. ```javascript var _vwo_code = {}; (function() { var d = document; var w = window; var cK = "_vis_opt_settings_cookie"; var c = "_vis_opt_exp_cookie"; var v = null; var stT = window.localStorage; var account_id = 123456; // Example account_id var version = "1.0"; // Example version _vwo_code.finish = function(e) { if (e) { var t = d.createElement('img'); t.src = 'https://dev.visualwebsiteoptimizer.com/ee.gif?a=' + account_id + e; t.style.display = 'none'; d.body.appendChild(t); } return false; }; _vwo_code.addScript = function(e) { var t = d.createElement('script'); t.type = 'text/javascript'; if (e.src) { t.src = e.src; } else { t.text = e.text; } v && t.setAttribute('nonce', v.nonce); d.getElementsByTagName('head')[0].appendChild(t); }; _vwo_code.load = function(e, t) { var n = this.getSettings(); var i = d.createElement('script'); var r = this; t = t || {}; if (n) { i.textContent = n; d.getElementsByTagName('head')[0].appendChild(i); if (!w.VWO || VWO.caE) { stT.removeItem(cK); r.load(e); } } else { var o = new XMLHttpRequest(); o.open('GET', e, true); o.withCredentials = !t.dSC; o.responseType = t.responseType || 'text'; o.onload = function() { if (t.onloadCb) { return t.onloadCb(o, e); } if (o.status === 200 || o.status === 304) { _vwo_code.addScript({ text: o.responseText }); } else { _vwo_code.finish('&e=loading_failure:' + e); } }; o.onerror = function() { if (t.onerrorCb) { return t.onerrorCb(e); } _vwo_code.finish('&e=loading_failure:' + e); }; o.send(); } }; _vwo_code.getSettings = function() { try { var e = stT.getItem(cK); if (!e) { return; } e = JSON.parse(e); if (Date.now() > e.e) { stT.removeItem(cK); return; } return e.s; } catch (e) { return; } }; _vwo_code.init = function() { if (d.URL.indexOf('__vwo__disable__') > -1) return; var e = this.settings_tolerance(); w._vwo_settings_timer = setTimeout(function() { _vwo_code.finish(); stT.removeItem(cK); }, e); var t; if (this.hide_element() !== 'body') { t = d.createElement('style'); var n = this.hide_element(), i = n ? n + this.hide_element_style() : '', r = d.getElementsByTagName('head')[0]; t.setAttribute('id', '_vis_opt_path_hides'); v && t.setAttribute('nonce', v.nonce); t.setAttribute('type', 'text/css'); if (t.styleSheet) t.styleSheet.cssText = i; else t.appendChild(d.createTextNode(i)); r.appendChild(t); } else { t = d.getElementsByTagName('head')[0]; var i = d.createElement('div'); i.style.cssText = 'z-index: 2147483647 !important;position: fixed !important;left: 0 !important;top: 0 !important;width: 100% !important;height: 100% !important;background: white !important;display: block !important;'; i.setAttribute('id', '_vis_opt_path_hides'); i.classList.add('_vis_hide_layer'); t.parentNode.insertBefore(i, t.nextSibling); } var o = window._vis_opt_url || d.URL, s = 'https://dev.visualwebsiteoptimizer.com/j.php?a=' + account_id + '&u=' + encodeURIComponent(o) + '&vn=' + version; if (w.location.search.indexOf('_vwo_xhr') !== -1) { this.addScript({ src: s }); } else { this.load(s + '&x=true'); } }; // Placeholder for settings_tolerance and hide_element methods if they were defined elsewhere _vwo_code.settings_tolerance = function() { return 5000; }; // Default tolerance _vwo_code.hide_element = function() { return 'body'; }; // Default hide element _vwo_code.hide_element_style = function() { return 'body { visibility: hidden !important; }'; }; // Default style w._vwo_code = _vwo_code; _vwo_code.init(); })(); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/accounts-payable/internal-controls-in-accounts-payable Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/procure-to-pay/procure-to-pay-software-solutions-in-the-philippines Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/supplier-management/automated-master-data-management-mdm Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/supplier-management/riding-the-digital-wave-the-evolution-of-supplier-risk-management-in-procurement Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### VWO Initialization and Core Logic Source: https://www.zycus.com/customers/success-story/global-energy-storage-solutions-onboards-zycus-source-to-contract-suite/ This snippet contains the core JavaScript code for initializing Visual Website Optimizer (VWO). It includes functions for loading scripts, managing settings, and initiating the VWO tracking process on the page. It relies on external variables like 'account_id' and 'version'. ```javascript var _vwo_code = {}; (function() { var d = document; var w = window; var cK = "_vis_opt_settings_cookie"; var c = "_vis_opt_exp_cookie"; var v = null; var stT = window.localStorage; var account_id = 123456; // Example account_id var version = "1.0"; // Example version _vwo_code.finish = function(e) { if (e) { var t = d.createElement('img'); t.src = 'https://dev.visualwebsiteoptimizer.com/ee.gif?a=' + account_id + e; t.style.display = 'none'; d.body.appendChild(t); } return false; }; _vwo_code.addScript = function(e) { var t = d.createElement('script'); t.type = 'text/javascript'; if (e.src) { t.src = e.src; } else { t.text = e.text; } v && t.setAttribute('nonce', v.nonce); d.getElementsByTagName('head')[0].appendChild(t); }; _vwo_code.load = function(e, t) { var n = this.getSettings(); var i = d.createElement('script'); var r = this; t = t || {}; if (n) { i.textContent = n; d.getElementsByTagName('head')[0].appendChild(i); if (!w.VWO || VWO.caE) { stT.removeItem(cK); r.load(e); } } else { var o = new XMLHttpRequest(); o.open('GET', e, true); o.withCredentials = !t.dSC; o.responseType = t.responseType || 'text'; o.onload = function() { if (t.onloadCb) { return t.onloadCb(o, e); } if (o.status === 200 || o.status === 304) { _vwo_code.addScript({ text: o.responseText }); } else { _vwo_code.finish('&e=loading_failure:' + e); } }; o.onerror = function() { if (t.onerrorCb) { return t.onerrorCb(e); } _vwo_code.finish('&e=loading_failure:' + e); }; o.send(); } }; _vwo_code.getSettings = function() { try { var e = stT.getItem(cK); if (!e) { return; } e = JSON.parse(e); if (Date.now() > e.e) { stT.removeItem(cK); return; } return e.s; } catch (e) { return; } }; _vwo_code.init = function() { if (d.URL.indexOf('__vwo__disable__') > -1) return; var e = this.settings_tolerance(); w._vwo_settings_timer = setTimeout(function() { _vwo_code.finish(); stT.removeItem(cK); }, e); var t; if (this.hide_element() !== 'body') { t = d.createElement('style'); var n = this.hide_element(), i = n ? n + this.hide_element_style() : '', r = d.getElementsByTagName('head')[0]; t.setAttribute('id', '_vis_opt_path_hides'); v && t.setAttribute('nonce', v.nonce); t.setAttribute('type', 'text/css'); if (t.styleSheet) t.styleSheet.cssText = i; else t.appendChild(d.createTextNode(i)); r.appendChild(t); } else { t = d.getElementsByTagName('head')[0]; var i = d.createElement('div'); i.style.cssText = 'z-index: 2147483647 !important;position: fixed !important;left: 0 !important;top: 0 !important;width: 100% !important;height: 100% !important;background: white !important;display: block !important;'; i.setAttribute('id', '_vis_opt_path_hides'); i.classList.add('_vis_hide_layer'); t.parentNode.insertBefore(i, t.nextSibling); } var o = window._vis_opt_url || d.URL, s = 'https://dev.visualwebsiteoptimizer.com/j.php?a=' + account_id + '&u=' + encodeURIComponent(o) + '&vn=' + version; if (w.location.search.indexOf('_vwo_xhr') !== -1) { this.addScript({ src: s }); } else { this.load(s + '&x=true'); } }; // Placeholder for settings_tolerance and hide_element methods if they were defined elsewhere _vwo_code.settings_tolerance = function() { return 5000; }; // Default tolerance _vwo_code.hide_element = function() { return 'body'; }; // Default hide element _vwo_code.hide_element_style = function() { return 'body { visibility: hidden !important; }'; }; // Default style w._vwo_code = _vwo_code; _vwo_code.init(); })(); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/ai-agents/gen-ai-agents-for-contract-management Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### VWO Initialization and Core Logic Source: https://www.zycus.com/blog/generative-ai/top-generative-ai-platforms-in-procurement This snippet contains the core JavaScript code for initializing Visual Website Optimizer (VWO). It includes functions for loading scripts, managing settings, and initiating the VWO tracking process on the page. It relies on external variables like 'account_id' and 'version'. ```javascript var _vwo_code = {}; (function() { var d = document; var w = window; var cK = "_vis_opt_settings_cookie"; var c = "_vis_opt_exp_cookie"; var v = null; var stT = window.localStorage; var account_id = 123456; // Example account_id var version = "1.0"; // Example version _vwo_code.finish = function(e) { if (e) { var t = d.createElement('img'); t.src = 'https://dev.visualwebsiteoptimizer.com/ee.gif?a=' + account_id + e; t.style.display = 'none'; d.body.appendChild(t); } return false; }; _vwo_code.addScript = function(e) { var t = d.createElement('script'); t.type = 'text/javascript'; if (e.src) { t.src = e.src; } else { t.text = e.text; } v && t.setAttribute('nonce', v.nonce); d.getElementsByTagName('head')[0].appendChild(t); }; _vwo_code.load = function(e, t) { var n = this.getSettings(); var i = d.createElement('script'); var r = this; t = t || {}; if (n) { i.textContent = n; d.getElementsByTagName('head')[0].appendChild(i); if (!w.VWO || VWO.caE) { stT.removeItem(cK); r.load(e); } } else { var o = new XMLHttpRequest(); o.open('GET', e, true); o.withCredentials = !t.dSC; o.responseType = t.responseType || 'text'; o.onload = function() { if (t.onloadCb) { return t.onloadCb(o, e); } if (o.status === 200 || o.status === 304) { _vwo_code.addScript({ text: o.responseText }); } else { _vwo_code.finish('&e=loading_failure:' + e); } }; o.onerror = function() { if (t.onerrorCb) { return t.onerrorCb(e); } _vwo_code.finish('&e=loading_failure:' + e); }; o.send(); } }; _vwo_code.getSettings = function() { try { var e = stT.getItem(cK); if (!e) { return; } e = JSON.parse(e); if (Date.now() > e.e) { stT.removeItem(cK); return; } return e.s; } catch (e) { return; } }; _vwo_code.init = function() { if (d.URL.indexOf('__vwo__disable__') > -1) return; var e = this.settings_tolerance(); w._vwo_settings_timer = setTimeout(function() { _vwo_code.finish(); stT.removeItem(cK); }, e); var t; if (this.hide_element() !== 'body') { t = d.createElement('style'); var n = this.hide_element(), i = n ? n + this.hide_element_style() : '', r = d.getElementsByTagName('head')[0]; t.setAttribute('id', '_vis_opt_path_hides'); v && t.setAttribute('nonce', v.nonce); t.setAttribute('type', 'text/css'); if (t.styleSheet) t.styleSheet.cssText = i; else t.appendChild(d.createTextNode(i)); r.appendChild(t); } else { t = d.getElementsByTagName('head')[0]; var i = d.createElement('div'); i.style.cssText = 'z-index: 2147483647 !important;position: fixed !important;left: 0 !important;top: 0 !important;width: 100% !important;height: 100% !important;background: white !important;display: block !important;'; i.setAttribute('id', '_vis_opt_path_hides'); i.classList.add('_vis_hide_layer'); t.parentNode.insertBefore(i, t.nextSibling); } var o = window._vis_opt_url || d.URL, s = 'https://dev.visualwebsiteoptimizer.com/j.php?a=' + account_id + '&u=' + encodeURIComponent(o) + '&vn=' + version; if (w.location.search.indexOf('_vwo_xhr') !== -1) { this.addScript({ src: s }); } else { this.load(s + '&x=true'); } }; // Placeholder for settings_tolerance and hide_element methods if they were defined elsewhere _vwo_code.settings_tolerance = function() { return 5000; }; // Default tolerance _vwo_code.hide_element = function() { return 'body'; }; // Default hide element _vwo_code.hide_element_style = function() { return 'body { visibility: hidden !important; }'; }; // Default style w._vwo_code = _vwo_code; _vwo_code.init(); })(); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/blog/supplier-management/automated-master-data-management-mdm Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### Fibr SDK Initialization and Styling Source: https://www.zycus.com/blog/accounts-payable/internal-controls-in-accounts-payable Initializes the Fibr client-side SDK and applies initial styles to manage image opacity and body visibility during loading. It aims to control the rendering process for performance or tracking purposes. ```javascript localStorage.setItem('\_\_fibr_current_url',window.location.href); document.head.append(Object.assign(document.createElement('style'),{id:'fibr-async-img-style',innerHTML:"img { opacity: 0; }"})); document.head.append(Object.assign(document.createElement('style'), {id:'fibr-style',innerHTML:"body { opacity: 0; }"})); setTimeout(() => { const e = document.getElementById("fibr-async-img-style"); e && (e.innerHTML = "img{opacity:1;}"); document.body.style.opacity = "1 !important"; const existingStyleTag = document.getElementById('fibr-style'); if (existingStyleTag && existingStyleTag.parentNode) { existingStyleTag.parentNode.removeChild(existingStyleTag); } }, 5000); (function(f,i,b,r){ var js,fjs=f.getElementsByTagName(i)[0]; if(f.getElementById(r))return; js=f.createElement(i); js.id=r; js.src='https://cdn.fibr.shop/sdks/client/'+b+'/fpt-client-sdk.min.js'; f.getElementsByTagName('head')[0].insertBefore(js,fjs); }(document,'script','6717b345dbb4c2ccd545c341','fibr-jssdk')); ``` -------------------------------- ### Google Tag Manager (GTM) Initialization Source: https://www.zycus.com/customers/success-story/a-leading-engineering-procurement-and-construction-company-in-us-partnered-with-zycus Loads the Google Tag Manager script asynchronously. This setup ensures that GTM is initialized with the provided container ID ('GTM-MCVMBK') and the 'dataLayer' is available for event tracking. ```javascript (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MCVMBK'); ``` -------------------------------- ### Gartner Peer Insights Widget Initialization Source: https://www.zycus.com/customers/success-story/global-energy-storage-solutions-onboards-zycus-source-to-contract-suite/ Initializes a Gartner Peer Insights widget with specified configuration options. This includes setting the widget size, theme, sourcing link, unique ID, version, and the target DOM container for rendering. ```javascript GartnerPI_Widget({ size: "small", theme: "dark", sourcingLink: "https://gtnr.io/FdSGMySkL", widget_id: "OTQzODkyYTktN2ZmZi00ZjBjLWIwNzEtMzIzYTgzYWYzMDE0", version: "2", container: document.querySelector("#p2pWidgetDiv") //DOM node in which the widget is to be rendered [e.g. document.querySelector("#myNodeContainer")] }) ``` ```javascript GartnerPI_Widget({ size: "small", theme: "dark", sourcingLink: "https://gtnr.io/MaIX2heMK", widget_id: "MjQ5OWI3M2QtNWRiOS00ZWFhLTkwNGItY2NiZDExYjVhNTUz", version: "2", container: document.querySelector("#clmWidgetDiv") //DOM node in which the widget is to be rendered [e.g. document.querySelector("#myNodeContainer")] }) ```