Skip to content

Conversation

@lmac012
Copy link
Contributor

@lmac012 lmac012 commented Nov 10, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/1205648422731273/task/1211892474020113?focus=true

Description

This PR adds a new wide event to monitor the success rate of enabling vpn.

Steps to test this PR

Prerequisites for each test scenario

Happy path

User rejects VPN permission

  • Go to VPN settings and enable VPN
  • Reject VPN permission
  • Verify that wide_vpn-enable.* pixels were sent with status=Cancelled

Another VPN is already running

  • Install and enable any other VPN on device
  • Go to VPN settings and enable DDG VPN
  • Tap "Cancel"
  • Verify that wide_vpn-enable.* pixels were sent, with status=Cancelled

Device is offline

  • Enable airplane mode in Android
  • Go to VPN settings and enable VPN
  • Grant VPN permission
  • Verify that there was an attempt to send wide_vpn-enable.* pixels, with status=Failure
    • we should enqueue such pixels to be sent when the device come online, but this is out of scope of this PR

Enable VPN using the tile in system tray

  • Go to system tray and enable VPN
  • Verify that if the app didn't have VPN permission, you were just taken to the VPN settings, VPN stays off and no wide event has been sent
  • Verify that if the app already had VPN permission, VPN was enabled and wide_vpn-enable.* pixel hase been sent

Re-enable VPN using system notification

  • Go to VPN settings and enable VPN
  • Grant VPN permission
  • Verify that wide_vpn-enable.* pixels were sent, with status=Success
  • Disable VPN
  • Go to system notifications and find the one saying "VPN is disconnected. Tap to continue securing your device traffic." and click "Connect"
  • Verify that wide_vpn-enable.* pixels were sent, with status=Success

App tracking protection is enabled

  • Enable AppTP
  • Go to VPN settings and enable VPN
  • Verify that there was an attempt to send wide_vpn-enable.* pixels, with status=Success
    • we should enqueue such pixels to be sent when the device come online, but this is out of scope of this PR

No UI changes

Copy link
Contributor Author

lmac012 commented Nov 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lmac012 lmac012 marked this pull request as ready for review November 10, 2025 12:56
@lmac012 lmac012 requested a review from karlenDimla November 10, 2025 12:56
@lmac012 lmac012 force-pushed the feature/lukasz/vpn-enable-wide-event branch 3 times, most recently from 322aa8d to 54d5f0a Compare November 11, 2025 03:47
@github-actions
Copy link
Contributor

Privacy Review task: https://app.asana.com/0/69071770703008/1211907027107113

"description": "The name of the app sending the pixel",
"enum": ["DuckDuckGo Android"]
},
"widePixelAppVersion": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between widePixelAppVersion and appVersion? Why do we need a different param? Is it mainly to align with other platforms?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good question @karlenDimla . @ladamski and/or @nshuba is there more to widePixelppVersion than aligning across platforms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the wide event schema was designed without taking existing pixel params into account, because the goal is to send wide events using dedicated POST endpoint and not as a pixel. I don't think we need widePixelAppVersion now, but it will make the transition from pixel to the dedicated endpoint smoother. widePixelAppVersion is also used in existing wide events that predate pixel registry integration, and changing that here would complicate things.

Copy link
Contributor

@karlenDimla karlenDimla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligns with definition and works as expected. It is worth noting (already mentioned in description) that sometimes the wide event pixel fails to send when the pixel is attempted to be sent when the VPN is not yet fully up and running - there might be some delays after startVPN has been executed. It is best to enqueue this pixel to be 100% sure that they are sent.

},
{
"key": "feature.data.ext.service_start_duration_ms_bucketed",
"description": "The duration of TrackerBlockingVpnService (re)start in milliseconds, bucketed",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe our default is to specify the lower end of each range. Is this lower or upper? Worth clarifying in the comment. https://app.asana.com/1/137249556945/project/1207561877052131/task/1210817094107521?focus=true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the upper end of each range. This bucketing logic is shared with existing wide events and AFAIK is the same on other platforms. I'm happy to change this to use lower end (TIL this should be the default), but I believe this change should be handled in a separate task.

{
"key": "feature.data.ext.step.show_vpn_conflict_dialog",
"description": "true if the user was asked if they want to disable existing 3rd party VPN",
"enum": ["true"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be set to false as well or only sent if true?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question for the next 5.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only sent when true, I'll clarify that in the description.

},
"first_daily_count_short": {
"type": "string",
"description": "Pixel schedule type",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be super clear could say in description u= first, d=daily, c=count

@lmac012 lmac012 force-pushed the feature/lukasz/vpn-enable-wide-event branch 2 times, most recently from 6b70739 to 82130c6 Compare November 12, 2025 01:18
@lmac012 lmac012 force-pushed the feature/lukasz/vpn-enable-wide-event branch from 82130c6 to 93d0f6e Compare November 12, 2025 02:01
@lmac012 lmac012 merged commit 185939d into develop Nov 12, 2025
11 of 12 checks passed
@lmac012 lmac012 deleted the feature/lukasz/vpn-enable-wide-event branch November 12, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants