Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into new-cpm-experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Oct 15, 2024
2 parents 24a9bfc + ffcbeb2 commit 60b5c80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/PhishingDetection/PhishingDetectionEvents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import PixelKit
public extension PixelKit {
enum Parameters: Hashable {
public static let clientSideHit = "client_side_hit"
public static let settingToggledTo = "setting_toggled_to"
}
}

Expand All @@ -30,6 +31,7 @@ public enum PhishingDetectionEvents: PixelKitEventV2 {
case visitSite
case iframeLoaded
case updateTaskFailed48h(error: Error?)
case settingToggled(to: Bool)

public var name: String {
switch self {
Expand All @@ -41,6 +43,8 @@ public enum PhishingDetectionEvents: PixelKitEventV2 {
return "phishing_detection_iframe-loaded"
case .updateTaskFailed48h:
return "phishing_detection_update-task-failed-48h"
case .settingToggled:
return "phishing_detection_setting-toggled"
}
}

Expand All @@ -54,6 +58,8 @@ public enum PhishingDetectionEvents: PixelKitEventV2 {
return [:]
case .updateTaskFailed48h(let error):
return error?.pixelParameters
case .settingToggled(let state):
return [PixelKit.Parameters.settingToggledTo: String(state)]
}
}

Expand All @@ -67,6 +73,8 @@ public enum PhishingDetectionEvents: PixelKitEventV2 {
return nil
case .iframeLoaded:
return nil
case .settingToggled:
return nil
}
}

Expand Down

0 comments on commit 60b5c80

Please sign in to comment.