Skip to content

Commit

Permalink
Merge pull request #4782 from wikimedia/T358735
Browse files Browse the repository at this point in the history
Add app install ID to EditAttemptStep
  • Loading branch information
staykids committed Mar 26, 2024
2 parents 8177927 + 789dadf commit e4f588d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WMF Framework/Event Platform/EventPlatformClient.swift
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
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

0 comments on commit e4f588d

Please sign in to comment.