-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Playground] [Frontend] Migrate Playground to Google Analytics 4 #24957
Changes from 3 commits
daa56b5
e143de9
6ae97ef
50adca2
74531cb
50b1fba
61a7764
5057195
a3b8460
a8316c3
d29eb80
de999f1
5981c6b
9b67020
324137f
866bbb1
e2e270d
6084e18
5b06e3f
3c481b3
c007d6f
4c1932e
c496f09
e68e03c
004de5d
bec4342
19d9de6
b1dd4a2
bbd2e38
42c9d32
1090e73
de115db
02b56f7
71d26ac
ea7c165
bbd7024
ec1f7df
45a1fc3
7b14534
ed1fac5
385132c
cd79651
fb34d74
183fb61
df7700c
08f05a8
2ca8e2c
34310a3
2966768
fbefe85
9eb41e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -18,6 +18,7 @@ | |||||||
|
||||||||
import 'package:app_state/app_state.dart'; | ||||||||
import 'package:get_it/get_it.dart'; | ||||||||
import 'package:playground/modules/analytics/google_analytics_service.dart'; | ||||||||
import 'package:playground_components/playground_components.dart'; | ||||||||
|
||||||||
import 'config.g.dart'; | ||||||||
|
@@ -28,6 +29,7 @@ import 'router/route_information_parser.dart'; | |||||||
Future<void> initializeServiceLocator() async { | ||||||||
_initializeRepositories(); | ||||||||
_initializeState(); | ||||||||
_initializeAnalyticsService(); | ||||||||
} | ||||||||
|
||||||||
void _initializeRepositories() { | ||||||||
|
@@ -57,3 +59,7 @@ void _initializeState() { | |||||||
), | ||||||||
); | ||||||||
} | ||||||||
|
||||||||
void _initializeAnalyticsService() { | ||||||||
GetIt.instance.registerSingleton(GoogleAnalyticsService()); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can register a single object under two handles:
Suggested change
This way |
||||||||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY IND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
class AnalyticsCategories { | ||
static const sdk = 'SDK'; | ||
static const example = 'Example'; | ||
static const common = 'Common'; | ||
static const link = 'Link'; | ||
static const feedback = 'Feedback'; | ||
static const runCode = 'Run Code'; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY IND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
class AnalyticsEvents { | ||
static const selectSdk = 'select_new_sdk'; | ||
static const selectExample = 'select_new_example'; | ||
static const clickNewExample = 'click_new_example'; | ||
static const clickReset = 'click_reset'; | ||
static const clickToggleTheme = 'click_toggle_theme'; | ||
static const openShortcutsModal = 'open_shortcuts_modal'; | ||
static const openLink = 'open_link'; | ||
static const clickEnjoyPlayground = 'click_enjoy_playground'; | ||
static const clickRun = 'click_run'; | ||
static const clickCancelRun = 'click_cancel_run'; | ||
static const runTime = 'run_time'; | ||
static const clickReportIssue = 'click_report_issue'; | ||
static const clickSendPositiveFeedback = 'click_send_positive_feedback'; | ||
static const clickSendNegativeFeedback = 'click_send_negative_feedback'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.