Skip to content

Commit

Permalink
Send pixel when dismiss clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme committed Sep 27, 2024
1 parent d481e2a commit 122b9e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions DuckDuckGo/Autofill/AutofillCredentialsImportManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extension AutofillCredentialsImportManager: AutofillPasswordImportDelegate {

public func autofillUserScriptDidRequestPermanentCredentialsImportPromptDismissal() {
stateStore.isCredentialsImportPromptPermanantlyDismissed = true
PixelKit.fire(AutofillPixelKitEvent.importCredentialsPromptNeverAgainClicked.withoutMacPrefix)
}

public func autofillUserScriptWillDisplayOverlay(_ serializedInputContext: String) {
Expand Down
3 changes: 3 additions & 0 deletions DuckDuckGo/Autofill/AutofillPixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ enum AutofillPixelKitEvent: PixelKitEventV2 {
case importCredentialsFlowHadCredentials
case importCredentialsFlowEnded

case importCredentialsPromptNeverAgainClicked

var name: String {
switch self {
case .importCredentialsFlowStarted: "autofill_import_credentials_flow_started"
case .importCredentialsFlowCancelled: "autofill_import_credentials_flow_cancelled"
case .importCredentialsFlowHadCredentials: "autofill_import_credentials_flow_had_credentials"
case .importCredentialsFlowEnded: "autofill_import_credentials_flow_ended"
case .importCredentialsPromptNeverAgainClicked: "autofill_import_credentials_prompt_never_again_clicked"
}
}

Expand Down

0 comments on commit 122b9e0

Please sign in to comment.