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

Add app install ID to EditAttemptStep #4782

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WMF Framework/Event Platform/EventPlatformClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ import CocoaLumberjackSwift
case settings = "/analytics/mobile_apps/ios_setting_action/1.0.0"
case login = "/analytics/mobile_apps/ios_login_action/1.0.2"
case navigation = "/analytics/mobile_apps/ios_navigation_events/1.0.0"
case editAttempt = "/analytics/legacy/editattemptstep/1.4.0"
case editAttempt = "/analytics/legacy/editattemptstep/2.0.3"
case watchlist = "/analytics/mobile_apps/ios_watchlists/4.0.0"
case appInteraction = "/analytics/mobile_apps/app_interaction/1.0.0"
}
Expand Down
5 changes: 4 additions & 1 deletion Wikipedia/Code/EditAttemptFunnel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public final class EditAttemptFunnel {
private struct Event: Codable {
let action: EditAction
let editing_session_id: String
let app_install_id: String?
let editor_interface: String
let integration: String
let mw_version: String
Expand Down Expand Up @@ -43,8 +44,10 @@ public final class EditAttemptFunnel {
let platform = UIDevice.current.userInterfaceIdiom == .pad ? "tablet" : "phone"

let userId = getUserID(pageURL: pageURL)

let appInstallID = UserDefaults.standard.wmf_appInstallId

let event = Event(action: action, editing_session_id: "", editor_interface: editorInterface, integration: integrationID, mw_version: "", platform: platform, user_editcount: 0, user_id: userId, version: 1, page_title: pageURL.wmf_title, page_ns: pageURL.namespace?.rawValue, revision_id: revisionId)
let event = Event(action: action, editing_session_id: "", app_install_id: appInstallID, editor_interface: editorInterface, integration: integrationID, mw_version: "", platform: platform, user_editcount: 0, user_id: userId, version: 1, page_title: pageURL.wmf_title, page_ns: pageURL.namespace?.rawValue, revision_id: revisionId)

let container = EventContainer(event: event)
EventPlatformClient.shared.submit(stream: .editAttempt, event: container, needsMinimal: true)
Expand Down