diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 29eadee0f7..0dd6d65ac7 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -916,6 +916,7 @@ extension Pixel { case openAIChatBefore10min case openAIChatAfter10min case aiChatNoRemoteSettingsFound(settings: String) + case openAIChatFromAddressBar // MARK: Lifecycle case appDidTransitionToUnexpectedState @@ -1833,6 +1834,7 @@ extension Pixel.Event { case .openAIChatBefore10min: return "m_aichat_open_before_10_min" case .aiChatNoRemoteSettingsFound(let settings): return "m_aichat_no_remote_settings_found-\(settings.lowercased())" + case .openAIChatFromAddressBar: return "m_aichat_addressbar_icon" // MARK: Lifecycle case .appDidTransitionToUnexpectedState: return "m_debug_app-did-transition-to-unexpected-state" diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index db55cc9565..c129c44057 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -2089,7 +2089,9 @@ extension MainViewController: OmniBarDelegate { switch accessoryType { case .chat: openAIChat() + Pixel.fire(pixel: .openAIChatFromAddressBar) case .share: + Pixel.fire(pixel: .addressBarShare) currentTab?.onShareAction(forLink: link, fromView: viewCoordinator.omniBar.accessoryButton) } } diff --git a/DuckDuckGo/OmniBar.swift b/DuckDuckGo/OmniBar.swift index 01415d572d..6f20b39507 100644 --- a/DuckDuckGo/OmniBar.swift +++ b/DuckDuckGo/OmniBar.swift @@ -546,7 +546,6 @@ class OmniBar: UIView { } @IBAction func onAccessoryPressed(_ sender: Any) { - Pixel.fire(pixel: .addressBarShare) omniDelegate?.onAccessoryPressed(accessoryType: accessoryType) }