Skip to content
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

T383359 #5145

Closed
wants to merge 9 commits into from
6 changes: 5 additions & 1 deletion Wikipedia/Code/DonateFunnel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ import WMF
logEvent(activeInterface: .wikiYiR, action: .impression, actionData: ["slide": "new_account_engage"])
}

func logYearInReviewLoginPromptDidAppearProfile() {
logEvent(activeInterface: .wikiYiR, action: .impression, actionData: ["slide": "yir_start_account_engage"])
}

func logYearInReviewLoginPromptDidTapLogin() {
logEvent(activeInterface: .wikiYiR, action: .accountEngageClick, actionData: ["slide": "new_account_engage"])
}
Expand All @@ -373,7 +377,7 @@ import WMF
}

func logYearInReviewLoginPromptDidTapNoThanksProfile() {
logEvent(activeInterface: .wikiYiR, action: .rejectClick, actionData: ["slide": "entry_b_profile"])
logEvent(activeInterface: .wikiYiR, action: .rejectClick, actionData: ["slide": "yir_start_account_engage"])
}

func logYearInReviewDidTapShare(slideLoggingID: String) {
Expand Down
2 changes: 2 additions & 0 deletions Wikipedia/Code/ProfileCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ final class ProfileCoordinator: NSObject, Coordinator, ProfileCoordinatorDelegat
alert.addAction(action2)

presentedViewController.present(alert, animated: true)

DonateFunnel.shared.logYearInReviewLoginPromptDidAppearProfile()
}
}

Expand Down
18 changes: 9 additions & 9 deletions Wikipedia/Code/YearInReviewCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
}

var aboutWikimediaURL: String {
if let languageCode {
"https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation/\(languageCode)"
} else {
"https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation"
var languageCodeSuffix = ""
if let primaryAppLanguageCode = dataStore.languageLinkController.appLanguage?.languageCode {
languageCodeSuffix = "\(primaryAppLanguageCode)"
}
return "https://www.mediawiki.org/wiki/Wikimedia_Apps/About_the_Wikimedia_Foundation?uselang=\(languageCodeSuffix)"
}

var aboutYIRURL: URL? {
if let languageCode {
URL(string: "https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS/Personalized_Wikipedia_Year_in_Review/How_your_data_is_used/\(languageCode)")
} else {
URL(string: "https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/iOS/Personalized_Wikipedia_Year_in_Review/How_your_data_is_used")
var languageCodeSuffix = ""
if let primaryAppLanguageCode = dataStore.languageLinkController.appLanguage?.languageCode {
languageCodeSuffix = "\(primaryAppLanguageCode)"
}
return URL(string: "https://www.mediawiki.org/wiki/Special:MyLanguage/Wikimedia_Apps/Team/iOS/Personalized_Wikipedia_Year_in_Review/How_your_data_is_used?uselang=\(languageCodeSuffix)")
}

var topReadBlogPost: String { "https://wikimediafoundation.org/news/2024/12/03/announcing-english-wikipedias-most-popular-articles-of-2024/"
Expand Down Expand Up @@ -639,7 +639,7 @@ final class YearInReviewCoordinator: NSObject, Coordinator {
subtitle: personalizedSaveCountSlideSubtitle(saveCount: count, articleNames: savedSlideData.articleTitles),
loggingID: "save_count_custom",
infoURL: aboutYIRURL,
hideDonateButton: shoudlHideDonateButton())
hideDonateButton: false)
}
}
case .mostReadDay:
Expand Down
Loading