Update game analytics key
This commit is contained in:
parent
241b4b42d9
commit
862c69eade
|
@ -9,8 +9,12 @@ import { GameRoot } from "../../game/root";
|
||||||
import { StaticMapEntityComponent } from "../../game/components/static_map_entity";
|
import { StaticMapEntityComponent } from "../../game/components/static_map_entity";
|
||||||
|
|
||||||
const logger = createLogger("game_analytics");
|
const logger = createLogger("game_analytics");
|
||||||
|
|
||||||
const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.shapez.io";
|
const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.shapez.io";
|
||||||
const analyticsLocalFile = "analytics_token.bin";
|
|
||||||
|
// Be sure to increment the ID whenever it changes to make sure all
|
||||||
|
// users are tracked
|
||||||
|
const analyticsLocalFile = "analytics_token.2.bin";
|
||||||
|
|
||||||
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||||
/**
|
/**
|
||||||
|
@ -115,6 +119,10 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
const savegameId = savegame.internalId;
|
const savegameId = savegame.internalId;
|
||||||
|
if (!gameState.core) {
|
||||||
|
logger.warn("Game state has no core");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const root = gameState.core.root;
|
const root = gameState.core.root;
|
||||||
if (!root) {
|
if (!root) {
|
||||||
logger.warn("Root is not initialized");
|
logger.warn("Root is not initialized");
|
||||||
|
|
Reference in New Issue