Skip to content

Commit 3ec257d

Browse files
authored
Add vpn start attempt success pixels (#4633)
Task/Issue URL: https://app.asana.com/0/1203137811378537/1207529492824734/f ### Description Add missing success pixels ### Steps to test this PR QA-optional
1 parent 557a136 commit 3ec257d

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixelNames.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ enum class DeviceShieldPixelNames(override val pixelName: String, val enqueue: B
224224

225225
VPN_MOTO_G_FIX_DAILY("m_vpn_ev_moto_g_fix_d", enqueue = true),
226226
VPN_START_ATTEMPT("m_vpn_ev_start_attempt_c", enqueue = true),
227+
VPN_START_ATTEMPT_SUCCESS("m_vpn_ev_start_attempt_success_c", enqueue = true),
227228
VPN_START_ATTEMPT_FAILURE("m_vpn_ev_start_attempt_failure_c", enqueue = true),
228229
;
229230
}

app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/pixels/DeviceShieldPixels.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ interface DeviceShieldPixels {
361361
fun reportMotoGFix()
362362

363363
fun reportVpnStartAttempt()
364+
365+
fun reportVpnStartAttemptSuccess()
364366
}
365367

366368
@ContributesBinding(AppScope::class)
@@ -774,6 +776,10 @@ class RealDeviceShieldPixels @Inject constructor(
774776
firePixel(DeviceShieldPixelNames.VPN_START_ATTEMPT)
775777
}
776778

779+
override fun reportVpnStartAttemptSuccess() {
780+
firePixel(DeviceShieldPixelNames.VPN_START_ATTEMPT_SUCCESS)
781+
}
782+
777783
private fun suddenKill() {
778784
firePixel(DeviceShieldPixelNames.ATP_KILLED)
779785
}

app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/service/TrackerBlockingVpnService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ class TrackerBlockingVpnService : VpnService(), CoroutineScope by MainScope(), V
393393
stopVpn(VpnStopReason.ERROR, true)
394394
}
395395

396+
deviceShieldPixels.reportVpnStartAttemptSuccess()
397+
396398
// This is something temporary while we confirm whether we're able to fix the moto g issues with appTP
397399
// see https://app.asana.com/0/488551667048375/1203410036713941/f for more info
398400
tunnelConfig?.let { config ->

0 commit comments

Comments
 (0)