Skip to content

Commit

Permalink
Add pixels and remove ATB
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Nov 7, 2024
1 parent 5ba63b9 commit 96f7c1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ import com.duckduckgo.app.global.install.AppInstallStore
import com.duckduckgo.app.global.install.daysInstalled
import com.duckduckgo.app.onboarding.store.OnboardingStore
import com.duckduckgo.app.pixels.AppPixelName
import com.duckduckgo.app.pixels.AppPixelName.SITE_NOT_WORKING_SHOWN
import com.duckduckgo.app.pixels.AppPixelName.SITE_NOT_WORKING_WEBSITE_BROKEN
import com.duckduckgo.app.settings.db.SettingsDataStore
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.app.statistics.pixels.Pixel.PixelValues.DAX_FIRE_DIALOG_CTA
Expand Down Expand Up @@ -1098,8 +1100,8 @@ sealed class HomePanelCta(
class BrokenSitePromptDialogCta() : Cta {

override val ctaId: CtaId = CtaId.BROKEN_SITE_PROMPT
override val shownPixel: Pixel.PixelName? = null
override val okPixel: Pixel.PixelName? = null
override val shownPixel: Pixel.PixelName = SITE_NOT_WORKING_SHOWN
override val okPixel: Pixel.PixelName = SITE_NOT_WORKING_WEBSITE_BROKEN
override val cancelPixel: Pixel.PixelName? = null

override fun pixelCancelParameters(): Map<String, String> = mapOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package com.duckduckgo.app.global.api
import com.duckduckgo.app.browser.WebViewPixelName
import com.duckduckgo.app.browser.httperrors.HttpErrorPixelName
import com.duckduckgo.app.pixels.AppPixelName
import com.duckduckgo.app.pixels.AppPixelName.SITE_NOT_WORKING_SHOWN
import com.duckduckgo.app.pixels.AppPixelName.SITE_NOT_WORKING_WEBSITE_BROKEN
import com.duckduckgo.app.statistics.pixels.Pixel
import com.duckduckgo.common.utils.AppUrl
import com.duckduckgo.common.utils.plugins.PluginPoint
Expand Down Expand Up @@ -86,6 +88,9 @@ object PixelInterceptorPixelsRequiringDataCleaning : PixelParamRemovalPlugin {
HttpErrorPixelName.WEBVIEW_RECEIVED_HTTP_ERROR_400_DAILY.pixelName to PixelParameter.removeAtb(),
HttpErrorPixelName.WEBVIEW_RECEIVED_HTTP_ERROR_4XX_DAILY.pixelName to PixelParameter.removeAtb(),
HttpErrorPixelName.WEBVIEW_RECEIVED_HTTP_ERROR_5XX_DAILY.pixelName to PixelParameter.removeAtb(),
SITE_NOT_WORKING_SHOWN.pixelName to PixelParameter.removeAtb(),
SITE_NOT_WORKING_WEBSITE_BROKEN.pixelName to PixelParameter.removeAtb(),

)
}
}
3 changes: 3 additions & 0 deletions app/src/main/java/com/duckduckgo/app/pixels/AppPixelName.kt
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ enum class AppPixelName(override val pixelName: String) : Pixel.PixelName {
RELOAD_TWICE_WITHIN_12_SECONDS("m_reload_twice_within_12_seconds"),
RELOAD_THREE_TIMES_WITHIN_20_SECONDS("m_reload_three_times_within_20_seconds"),

SITE_NOT_WORKING_WEBSITE_BROKEN("site_not_working_website_is_broken"),
SITE_NOT_WORKING_SHOWN("m.site_not_working_shown"),

URI_LOADED("m_uri_loaded"),

ERROR_PAGE_SHOWN("m_errorpageshown"),
Expand Down

0 comments on commit 96f7c1a

Please sign in to comment.