HostSetup: Track if using GitHub/GitLab/other

This commit is contained in:
Vishesh Handa
2020-03-01 15:21:30 +01:00
parent 44d916138d
commit a0e3e50b4a

View File

@ -477,9 +477,20 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
await repo.commit(message: "Add gitignore file");
}
String hostType = "Unknown";
if (_gitCloneUrl.contains("github.com")) {
hostType = "GitHub";
} else if (_gitCloneUrl.contains("gitlab.org")) {
hostType = "GitLab.org";
} else if (_gitCloneUrl.contains("gitlab")) {
hostType = "GitLab";
}
getAnalytics().logEvent(
name: "onboarding_complete",
parameters: <String, dynamic>{},
parameters: <String, dynamic>{
"host_type": hostType,
},
);
Navigator.pop(context);
widget.onCompletedFunction();