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 { 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user