File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ static HMODULE g_analytics_module = 0;
46
46
static bool g_initialized = false ;
47
47
static int g_fake_instance_id = 0 ;
48
48
static bool g_analytics_collection_enabled = true ;
49
+ static std::string g_app_id;
50
+ static std::string g_package_name;
49
51
50
52
// Initializes the Analytics desktop API.
51
53
// This function must be called before any other Analytics methods.
@@ -83,15 +85,15 @@ void Initialize(const App& app) {
83
85
LogInfo (" Analytics: Loaded Google Analytics module." );
84
86
85
87
// Initialize Google Analytics C API
86
- std::string current_app_id = app.options ().app_id ();
87
- std::string current_package_name = app.options ().package_name ();
88
+ g_app_id = app.options ().app_id ();
89
+ g_package_name = app.options ().package_name ();
88
90
89
91
GoogleAnalytics_Options* c_options = GoogleAnalytics_Options_Create ();
90
92
if (!c_options) {
91
93
LogError (" Analytics: Failed to create GoogleAnalytics_Options." );
92
94
} else {
93
- c_options->app_id = current_app_id .c_str ();
94
- c_options->package_name = current_package_name .c_str ();
95
+ c_options->app_id = g_app_id .c_str ();
96
+ c_options->package_name = g_package_name .c_str ();
95
97
c_options->analytics_collection_enabled_at_first_launch =
96
98
g_analytics_collection_enabled;
97
99
You can’t perform that action at this time.
0 commit comments