{ var WindowsButton = document.getElementById(‘windowsButton’); var WindowsButtonAnchor = document.querySelector(‘#windowsButton .elementor-widget-container .elementor-image a’); var WindowsButtonAnchorImage = document.querySelector(‘#windowsButton .elementor-widget-container .elementor-image a img’); var popupImage = document.getElementById(‘popGround’); var popupButton = document.getElementById(‘popupButton’); var popupButtonAnchor = document.querySelector(‘#popupButton a’); var popupButtonAnchorImage = document.querySelector(‘#popupButton a img’); const userClickedCta = () => { landingScript.pageLog(“CLICK_APP_INSTALLED”); console.log(“Clicked CLICK_APP_INSTALLED”); } const appStatusCheck = () => { customProtocolCheck( “gambino://landing”, () => { //Custom protocol not found. WindowsButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/’; popupButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/’; landingScript.pageLog(“BROWSER_POPUP_CANCEL”); console.log(“Clicked BROWSER_POPUP_CANCEL”); // WindowsButtonAnchorImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2019/10/install_now.png’; }, () => { //Custom protocol found and opened the file successfully. // WindowsButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/?found’; // popupButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/?found’; console.log(“Active/lapsed – opened G POP”); }, 2000 ); } const checkLog = () => { } const newUserAppStatusCheck = () => { customProtocolCheck( “gambino://landing”, () => { //Custom protocol not found. // console.log(“222”); WindowsButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/’; popupButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/’; landingScript.pageLog(“BROWSER_POPUP_CANCEL”); console.log(“New user Clicked BROWSER_POPUP_CANCEL”); // WindowsButtonAnchorImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2019/10/install_now.png’; }, () => { //Custom protocol found and opened the file successfully. // WindowsButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/?newfound’; // popupButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/?newFound’; console.log(“New user found and opened the open game popup appeared”); console.log(“333”); }, 2000 ); } const sendGaEvent = async (vs) => { const response = await fetch(‘https://api.ipify.org?format=json’); const data = await response.json(); eventLabel = data.ip; if (typeof ga === “function”) { ga(‘send’, ‘event’, ‘mvp_click’, vs, eventLabel, { hitCallback: function() { console.log(‘mvp_click event sent’); // console.log(“event vs:” + vs ); } }); } } const setCookieOnClick = () => { ackSetCookie(‘ack_mvp’, 90); } const openBrowserPop = () => { setCookieOnClick(); window.open(‘gambino://landing’, ‘_self’); userClickedCta(); } const changeHtmlOuput = (playerStatus) => { //playerStatus new, active, lapsed console.log(‘playerStatusss:’, playerStatus); // analytics pageview if (playerStatus == ‘active’){ ga(‘send’, ‘event’, ‘mvp_visit’, playerStatus , ‘actualData’); } else if (playerStatus == ‘new’){ ga(‘send’, ‘event’, ‘mvp_visit’, playerStatus, ‘actualData’); } else if (playerStatus == ‘lapsed’){ ga(‘send’, ‘event’, ‘mvp_visit’, playerStatus , ‘actualData’); } let eventLabel; if (playerStatus == ‘active’ || playerStatus == ‘lapsed’) { // document.getElementById(“backgroundImage”).style.backgroundImage= “url(‘https://www.freeslots-machines.com/wp-content/uploads/2022/02/New-Players-Landing-page-5-1-1.jpg’)”; // popupImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2022/03/Popup_Microsoft-store_500EG.jpg’; WindowsButtonAnchorImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2022/03/open-gambino_btn-1-e1646570297159.png’; WindowsButton.addEventListener(“click”, appStatusCheck); popupButton.addEventListener(“click”, appStatusCheck); popupButtonAnchorImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2021/11/open-gambino_btn.png’; WindowsButtonAnchorImage.classList.add(“paddingBottom15px”); popupButton.addEventListener(“click”, userClickedCta); WindowsButton.addEventListener(“click”, userClickedCta); //Adding popupHelper var modal = document.getElementById(“myChromeModal”); // Get the button that opens the modal var btn = document.getElementById(“windowsButton”); // Get the element that closes the modal var span = document.getElementsByClassName(“close”)[0]; // When the user clicks on the button, open the modal btn.onclick = function() { modal.style.display = “block”; } // When the user clicks on (x), close the modal span.onclick = function() { modal.style.display = “none”; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = “none”; } } document.getElementById(“buttonDontWork”).style.display = “block”; document.getElementById(“buttonDontWork2”).style.display = “block”; // openBrowserPop(); } else if (playerStatus == ‘new’) { WindowsButton.addEventListener(“click”, setCookieOnClick); popupButton.addEventListener(“click”, setCookieOnClick); // WindowsButtonAnchorImage.src = ‘https://www.freeslots-machines.com/wp-content/uploads/2019/10/install_now.png’; // WindowsButtonAnchor.href = ‘https://c.gambinoslot.com/bing_search_lp_v2/’; // cant use this for new users // WindowsButton.addEventListener(“click”, newUserAppStatusCheck); // popupButton.addEventListener(“click”, newUserAppStatusCheck); // WindowsButton.addEventListener(“load”, newUserAppStatusCheck); // newUserAppStatusCheck; // Trying to open // newUserAppStatusCheck(); // window.open(‘gambino://landing’, ‘_self’); // window.open(‘https://www.gambinoslot.com/’, ‘_blank’); } } // varible visitorStatus is loaded from https://www.freeslots-machines.com/src/ack-mvp.js changeHtmlOuput(visitorStatus); sendGaEvent(visitorStatus); }); ]]>