Minor update to analytics init

This commit is contained in:
Lucas Dower 2023-06-26 17:22:07 +01:00
parent 5efbbab234
commit 82acb0133d
3 changed files with 11 additions and 4 deletions

View File

@ -16,10 +16,13 @@ export class AppAnalytics {
public static Init() {
gtag.install('G-W0SCWQ7HGJ', { 'send_page_view': true });
if (AppConfig.Get.VERSION_TYPE === 'd') {
gtag.gtag('config', 'G-W0SCWQ7HGJ', { 'debug_mode': true });
}
gtag.gtag('js', new Date());
gtag.gtag('config', 'G-W0SCWQ7HGJ', AppConfig.Get.VERSION_TYPE === 'd' ? { 'debug_mode': true } : {});
this.Get._ready = true;
this.Event('init', {
version: AppConfig.Get.getVersionString(),
})
}
public static Event(id: string, attributes?: any) {

View File

@ -49,4 +49,8 @@ export class AppConfig {
public dumpConfig() {
LOG(this);
}
public getVersionString() {
return `v${this.MAJOR_VERSION}.${this.MINOR_VERSION}.${this.HOTFIX_VERSION}${this.VERSION_TYPE}`;
}
}

View File

@ -56,7 +56,7 @@ export class HeaderComponent extends BaseComponent<HTMLDivElement> {
ObjToSchematic
</div>
<div class="row-item subtitle">
v${AppConfig.Get.MAJOR_VERSION}.${AppConfig.Get.MINOR_VERSION}.${AppConfig.Get.HOTFIX_VERSION}${AppConfig.Get.VERSION_TYPE} Minecraft ${AppConfig.Get.MINECRAFT_VERSION}
${AppConfig.Get.getVersionString()} Minecraft ${AppConfig.Get.MINECRAFT_VERSION}
</div>
</div>
</div>