(function() { var BASE_URL = "http://web.archive.org/web/20202020202038/https://bc351.infusionsoft.com"; function buildDataModel() { var resolution = screen.width + "x" + screen.height; var pluginsArray = []; if (window.ActiveXObject) { pluginsArray = detectIEPlugins(); } else { pluginsArray = [] .filter.call(navigator.plugins, function(plugin) { var pluginName = simplifiedPluginName(plugin.name); return pluginName ? true : false; }) .map(function(plugin) { return simplifiedPluginName(plugin.name); }); } return { screenResolution: resolution, plugins: pluginsArray, javaEnabled: navigator.javaEnabled(), domain: window.location.hostname, location: window.location.href, referrer: document.referrer }; } function simplifiedPluginName(plugin) { var simplifiedPluginName = ""; if (plugin.indexOf("Adobe Reader") > 0) { simplifiedPluginName = "Adobe Reader"; } if (plugin.indexOf("Shockwave") > 0 || plugin.indexOf("director") > 0) { simplifiedPluginName = "Shockwave"; } if (plugin.indexOf("Flash") > 0) { simplifiedPluginName = "Flash"; } if (plugin.indexOf("QuickTime") > 0) { simplifiedPluginName = "Quick Time"; } if (plugin.indexOf("RealPlayer") > 0 || plugin.indexOf("Real Player") > 0) { simplifiedPluginName = "RealPlayer"; } if (plugin.indexOf("Windows Media Player") > 0) { simplifiedPluginName = "Windows Media Player"; } if (plugin.indexOf("Silverlight") > 0) { simplifiedPluginName = "Silverlight"; } return simplifiedPluginName; } function detectIEPlugins() { var activeXNames = {'AcroPDF.PDF':'Adobe Reader', 'ShockwaveFlash.ShockwaveFlash':'Flash', 'QuickTime.QuickTime':'Quick Time', 'SWCtl':'Shockwave', 'WMPLayer.OCX':'Windows Media Player', 'AgControl.AgControl':'Silverlight'}; var plugins = []; for (var activeKey in activeXNames) { if (activeXNames.hasOwnProperty(activeKey)) { try { // Attempt to verify that the plugin exists by creating it. new ActiveXObject(activeKey); plugins.push(activeXNames[activeKey]); } catch (e) { // do nothing, the plugin is not installed } } } var realPlayerNames = ['rmockx.RealPlayer G2 Control', 'rmocx.RealPlayer G2 Control.1', 'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)', 'RealVideo.RealVideo(tm) ActiveX Control (32-bit)', 'RealPlayer']; var hasRealPlayerPlugin = false; for (var i = 0; i 0) { createCookie(contactId); } } } } var INITIAL_TIMESTAMP = new Date().getTime(); document.onreadystatechange = function() { if (document.readyState === 'complete') { var contactKeyHash = getParameterByName('inf_contact_key'); var contactIdFromExistingCookie = getContactIdFromExistingCookie(); if (contactKeyHash) { triggerEventForContactKey(contactKeyHash, INITIAL_TIMESTAMP); } else if (contactIdFromExistingCookie > 0) { triggerEventForContactId(contactIdFromExistingCookie, INITIAL_TIMESTAMP); } else { window.addEventListener('message', iframeCookieHandler); buildIframe(); } } }; })();