diff --git a/src/js/application.js b/src/js/application.js index b2e57ddc..a1557263 100644 --- a/src/js/application.js +++ b/src/js/application.js @@ -36,6 +36,7 @@ import { MainMenuState } from "./states/main_menu"; import { MobileWarningState } from "./states/mobile_warning"; import { PreloadState } from "./states/preload"; import { SettingsState } from "./states/settings"; +import { NoGameAnalytics } from "./platform/browser/no_game_analytics"; const logger = createLogger("application"); @@ -133,7 +134,8 @@ export class Application { this.adProvider = new NoAdProvider(this); this.sound = new SoundImplBrowser(this); this.analytics = new GoogleAnalyticsImpl(this); - this.gameAnalytics = new ShapezGameAnalytics(this); + // this.gameAnalytics = new ShapezGameAnalytics(this); + this.gameAnalytics = new NoGameAnalytics(this); } /** diff --git a/src/js/main.js b/src/js/main.js index 3847141e..5b9df699 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -18,35 +18,36 @@ if (window.coreThreadLoadedCb) { window.coreThreadLoadedCb(); } -if (!G_IS_DEV && !G_IS_STANDALONE) { - const monthlyUsers = 300; // thousand - const logrocketLimit = 10; // thousand - const percentageOfUsers = logrocketLimit / monthlyUsers; +// Logrocket +// if (!G_IS_DEV && !G_IS_STANDALONE) { +// const monthlyUsers = 300; // thousand +// const logrocketLimit = 10; // thousand +// const percentageOfUsers = logrocketLimit / monthlyUsers; - if (Math.random() <= percentageOfUsers) { - logger.log("Analyzing this session with logrocket"); - const logrocket = require("logrocket"); - logrocket.init("p1x9zh/shapezio"); +// if (Math.random() <= percentageOfUsers) { +// logger.log("Analyzing this session with logrocket"); +// const logrocket = require("logrocket"); +// logrocket.init("p1x9zh/shapezio"); - try { - logrocket.getSessionURL(function (sessionURL) { - logger.log("Connected lockrocket to GA"); - // @ts-ignore - try { - window.ga("send", { - hitType: "event", - eventCategory: "LogRocket", - eventAction: sessionURL, - }); - } catch (ex) { - logger.warn("Logrocket connection to analytics failed:", ex); - } - }); - } catch (ex) { - logger.warn("Logrocket connection to analytics failed:", ex); - } - } -} +// try { +// logrocket.getSessionURL(function (sessionURL) { +// logger.log("Connected lockrocket to GA"); +// // @ts-ignore +// try { +// window.ga("send", { +// hitType: "event", +// eventCategory: "LogRocket", +// eventAction: sessionURL, +// }); +// } catch (ex) { +// logger.warn("Logrocket connection to analytics failed:", ex); +// } +// }); +// } catch (ex) { +// logger.warn("Logrocket connection to analytics failed:", ex); +// } +// } +// } console.log( `%cshapez.io ️%c\n© 2020 Tobias Springer IT Solutions\nCommit %c${G_BUILD_COMMIT_HASH}%c on %c${new Date(