Skip to content

Commit eea091b

Browse files
authored
Onboarding analytics fixes (#3736)
2 parents 3f6f92f + d40884b commit eea091b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

podcasts/Constants.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ enum PlusUpgradeViewSource: String {
424424
case upNextShuffle
425425
case generatedTranscripts
426426
case onboarding
427+
case onboardingRecommendations = "onboarding_recommendations"
427428
case suggestedFolders = "suggested_folders"
428429
case bannerAd = "banner_ad"
429430
case login

podcasts/NewEmailViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ class NewEmailViewController: PCViewController, UITextFieldDelegate {
114114
originalButtonConstant = nextButtonBottomConstraint.constant
115115

116116
updateButtonState()
117-
Analytics.track(.createAccountShown)
117+
118+
OnboardingFlow.shared.track(.createAccountShown)
118119
}
119120

120121
override func viewDidAppear(_ animated: Bool) {

podcasts/Onboarding/LoginCoordinator.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class LoginCoordinator: NSObject, OnboardingModel {
7575
}
7676

7777
func getStartedTapped() {
78-
OnboardingFlow.shared.track(.setupAccountButtonTapped, properties: ["button": "get_started"])
78+
OnboardingFlow.shared.updateAnalyticsSource(.onboardingRecommendations)
7979
let hostingController: UIViewController
8080
if FeatureFlag.newOnboardingRecommendationChanges.enabled {
8181
let view = InterestsView(continueCallback: { categories in
@@ -107,7 +107,6 @@ class LoginCoordinator: NSObject, OnboardingModel {
107107

108108
func recommendationsContinueTapped() {
109109
socialAuthProvider = nil
110-
OnboardingFlow.shared.track(.setupAccountButtonTapped, properties: ["button": "recommendations_continue"])
111110
let view = LoginLandingView(coordinator: self, fullScreenMode: true)
112111
let hostingController = LoginLandingHostingController(rootView: view.setupDefaultEnvironment())
113112
hostingController.viewModel = self

podcasts/Onboarding/PodcastSubscribeButton.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct PodcastSubscribeButton: View {
6767
HapticsHelper.triggerSubscribedHaptic()
6868

6969
let analyticsUuid = podcast.uuid ?? podcast.iTunesId ?? "unknown"
70-
Analytics.track(.podcastSubscribed, properties: ["source": searchAnalyticsHelper.source, "uuid": analyticsUuid])
70+
OnboardingFlow.shared.track(.podcastSubscribed, properties: ["source": searchAnalyticsHelper.source, "uuid": analyticsUuid])
7171
}
7272

7373
private func unsubscribe() {
@@ -79,6 +79,6 @@ struct PodcastSubscribeButton: View {
7979

8080
PodcastManager.shared.unsubscribe(podcast: podcast)
8181

82-
Analytics.track(.podcastUnsubscribed, properties: ["source": searchAnalyticsHelper.source, "uuid": podcast.uuid])
82+
OnboardingFlow.shared.track(.podcastUnsubscribed, properties: ["source": searchAnalyticsHelper.source, "uuid": podcast.uuid])
8383
}
8484
}

0 commit comments

Comments
 (0)