mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Disable analytics and logrocket for now
This commit is contained in:
parent
95a437a8bb
commit
fad7a417f2
@ -36,6 +36,7 @@ import { MainMenuState } from "./states/main_menu";
|
|||||||
import { MobileWarningState } from "./states/mobile_warning";
|
import { MobileWarningState } from "./states/mobile_warning";
|
||||||
import { PreloadState } from "./states/preload";
|
import { PreloadState } from "./states/preload";
|
||||||
import { SettingsState } from "./states/settings";
|
import { SettingsState } from "./states/settings";
|
||||||
|
import { NoGameAnalytics } from "./platform/browser/no_game_analytics";
|
||||||
|
|
||||||
const logger = createLogger("application");
|
const logger = createLogger("application");
|
||||||
|
|
||||||
@ -133,7 +134,8 @@ export class Application {
|
|||||||
this.adProvider = new NoAdProvider(this);
|
this.adProvider = new NoAdProvider(this);
|
||||||
this.sound = new SoundImplBrowser(this);
|
this.sound = new SoundImplBrowser(this);
|
||||||
this.analytics = new GoogleAnalyticsImpl(this);
|
this.analytics = new GoogleAnalyticsImpl(this);
|
||||||
this.gameAnalytics = new ShapezGameAnalytics(this);
|
// this.gameAnalytics = new ShapezGameAnalytics(this);
|
||||||
|
this.gameAnalytics = new NoGameAnalytics(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,35 +18,36 @@ if (window.coreThreadLoadedCb) {
|
|||||||
window.coreThreadLoadedCb();
|
window.coreThreadLoadedCb();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!G_IS_DEV && !G_IS_STANDALONE) {
|
// Logrocket
|
||||||
const monthlyUsers = 300; // thousand
|
// if (!G_IS_DEV && !G_IS_STANDALONE) {
|
||||||
const logrocketLimit = 10; // thousand
|
// const monthlyUsers = 300; // thousand
|
||||||
const percentageOfUsers = logrocketLimit / monthlyUsers;
|
// const logrocketLimit = 10; // thousand
|
||||||
|
// const percentageOfUsers = logrocketLimit / monthlyUsers;
|
||||||
|
|
||||||
if (Math.random() <= percentageOfUsers) {
|
// if (Math.random() <= percentageOfUsers) {
|
||||||
logger.log("Analyzing this session with logrocket");
|
// logger.log("Analyzing this session with logrocket");
|
||||||
const logrocket = require("logrocket");
|
// const logrocket = require("logrocket");
|
||||||
logrocket.init("p1x9zh/shapezio");
|
// logrocket.init("p1x9zh/shapezio");
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
logrocket.getSessionURL(function (sessionURL) {
|
// logrocket.getSessionURL(function (sessionURL) {
|
||||||
logger.log("Connected lockrocket to GA");
|
// logger.log("Connected lockrocket to GA");
|
||||||
// @ts-ignore
|
// // @ts-ignore
|
||||||
try {
|
// try {
|
||||||
window.ga("send", {
|
// window.ga("send", {
|
||||||
hitType: "event",
|
// hitType: "event",
|
||||||
eventCategory: "LogRocket",
|
// eventCategory: "LogRocket",
|
||||||
eventAction: sessionURL,
|
// eventAction: sessionURL,
|
||||||
});
|
// });
|
||||||
} catch (ex) {
|
// } catch (ex) {
|
||||||
logger.warn("Logrocket connection to analytics failed:", ex);
|
// logger.warn("Logrocket connection to analytics failed:", ex);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} catch (ex) {
|
// } catch (ex) {
|
||||||
logger.warn("Logrocket connection to analytics failed:", ex);
|
// logger.warn("Logrocket connection to analytics failed:", ex);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`%cshapez.io ️%c\n© 2020 Tobias Springer IT Solutions\nCommit %c${G_BUILD_COMMIT_HASH}%c on %c${new Date(
|
`%cshapez.io ️%c\n© 2020 Tobias Springer IT Solutions\nCommit %c${G_BUILD_COMMIT_HASH}%c on %c${new Date(
|
||||||
|
Loading…
Reference in New Issue
Block a user