Skip to content

Commit e30e030

Browse files
authored
Fix env designation pt 2 (#186)
* Fix env designation pt 2 * fix method
1 parent 387be12 commit e30e030

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ func track_event(event_type: String, properties:={}) -> void:
3636

3737
## Send a single event to the Mixpanel Analytics service
3838
func _send_track_event(event: AnalyticsEvent, properties := {}) -> void:
39+
var version := Util.get_version_string()
40+
var release := Util.get_release_name()
3941
var standard_properties = {
4042
"token": api_token,
4143
"distinct_id": event.user_id,
42-
"env": "open-source-v2"
44+
"env": "open-source-v2",
45+
"version": version,
46+
"release": release
4347
}
4448
if not properties.is_empty():
4549
standard_properties.merge(properties)

mirror-godot-app/scripts/autoload/util_funcs.gd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ static func current_platform_is_windows() -> bool:
105105
return get_current_platform_name() == WIN_NAME
106106

107107

108+
static func get_release_name() -> String:
109+
return "Horizon"
110+
111+
108112
static func get_simple_platform_name(os_name:String) -> String:
109113
var lower_os_name = os_name.to_lower()
110114
return PLATFORMS.get(lower_os_name, lower_os_name)

mirror-godot-app/ui/global_version_label/version_label.gd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@ func _ready():
1010
## Sets the version label to the parsed version string.
1111
func _set_version_label() -> void:
1212
var version := Util.get_version_string()
13+
var release := Util.get_release_name()
1314
text = ' '.join([
1415
text,
15-
_release_name(version),
16+
release,
1617
"v%s-%s" % [
1718
version,
1819
ProjectSettings.get_setting("mirror/env_name")
1920
]
2021
])
2122
if ProjectSettings.get_setting("feature_flags/large_text_size", false):
2223
add_theme_font_size_override(&"font_size", 22)
23-
24-
func _release_name(version) -> String:
25-
return "Gravity"

0 commit comments

Comments
 (0)