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;
4646static bool g_initialized = false ;
4747static int g_fake_instance_id = 0 ;
4848static bool g_analytics_collection_enabled = true ;
49+ static std::string g_app_id;
50+ static std::string g_package_name;
4951
5052// Initializes the Analytics desktop API.
5153// This function must be called before any other Analytics methods.
@@ -83,15 +85,15 @@ void Initialize(const App& app) {
8385 LogInfo (" Analytics: Loaded Google Analytics module." );
8486
8587 // 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 ();
8890
8991 GoogleAnalytics_Options* c_options = GoogleAnalytics_Options_Create ();
9092 if (!c_options) {
9193 LogError (" Analytics: Failed to create GoogleAnalytics_Options." );
9294 } 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 ();
9597 c_options->analytics_collection_enabled_at_first_launch =
9698 g_analytics_collection_enabled;
9799
You can’t perform that action at this time.
0 commit comments