Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds pixels to track main VPN funnels #2304

Merged
merged 10 commits into from
Mar 7, 2024

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Mar 3, 2024

Task/Issue URL: https://app.asana.com/0/0/1206737255908394/f

iOS PR: duckduckgo/iOS#2543
BSK PR: duckduckgo/BrowserServicesKit#698

Description

Add pixels to better track all main VPN funnels:

  • VPN Controller Start (installation, onboarding)
  • VPN Tunnel Start
  • VPN Tunnel Update (change location, etc)

Testing

Setup

  • Open Console.app
  • Filter by 👾
  • To make clearing the tunnel-side pixels easier use: open ~/Library/Group\ Containers/HKE973VLUW.com.duckduckgo.macos.browser.network-protection.system-extension.debug/Library/Preferences/HKE973VLUW.com.duckduckgo.macos.browser.network-protection.system-extension.debug.plist

Test 1: start success

  1. Reset the relevant pixels:
m_mac_netp_controller_start_attempt
m_mac_netp_controller_start_success
m_mac_netp_controller_start_failure
m_mac_netp_tunnel_start_attempt
m_mac_netp_tunnel_start_failure
m_mac_netp_tunnel_start_success
  1. Fully uninstall the VPN or Debug Menu > Network Protection > Reset > Reset All State Keeping Invite
  2. Start the tunnel.
  3. Complete the installation.
  4. Make sure you see these as both daily and count (order of success ones can vary):
  • m_mac_netp_controller_start_attempt
  • m_mac_netp_controller_start_success
  • m_mac_netp_tunnel_start_attempt
  • m_mac_netp_tunnel_start_success

Test 2: controller start failure

  1. Reset the relevant pixels:
m_mac_netp_controller_start_attempt
m_mac_netp_controller_start_success
m_mac_netp_controller_start_failure
m_mac_netp_tunnel_start_attempt
m_mac_netp_tunnel_start_failure
m_mac_netp_tunnel_start_success
  1. Force an error by throwing here.
  2. Fully uninstall the VPN or Debug Menu > Network Protection > Reset > Reset All State Keeping Invite
  3. Start the tunnel. The installation should fail.
  4. Make sure you see these as both daily and count:
  • m_mac_netp_controller_start_attempt
  • m_mac_netp_controller_start_failure (this should include error info)

Test 3: tunnel start failure

  1. Reset the relevant pixels:
m_mac_netp_controller_start_attempt
m_mac_netp_controller_start_success
m_mac_netp_controller_start_failure
m_mac_netp_tunnel_start_attempt
m_mac_netp_tunnel_start_failure
m_mac_netp_tunnel_start_success
  1. Force error by throwing here.
  2. Fully uninstall the VPN or Debug Menu > Network Protection > Reset > Reset All State Keeping Invite
  3. Start the tunnel. The installation should fail.
  4. Make sure you see these as both daily and count:
  • m_mac_netp_controller_start_attempt
  • m_mac_netp_controller_start_success
  • m_mac_netp_tunnel_start_attempt
  • m_mac_netp_tunnel_start_falure (this should include error info)

Test 4: tunnel update success

  1. Reset the relevant pixels:
m_mac_netp_tunnel_update_attempt
m_mac_netp_tunnel_update_success
m_mac_netp_tunnel_update_failure
  1. Fully uninstall the VPN or Debug Menu > Network Protection > Reset > Reset All State Keeping Invite
  2. Start the tunnel.
  3. Once connected change your geolocation.
  4. Make sure you see these as both daily and count:
  • m_mac_netp_tunnel_update_attempt
  • m_mac_netp_tunnel_update_success

Test 5: tunnel update failure

  1. Reset the relevant pixels:
m_mac_netp_tunnel_update_attempt
m_mac_netp_tunnel_update_success
m_mac_netp_tunnel_update_failure
  1. Force an error by throwing here.
  2. Fully uninstall the VPN or Debug Menu > Network Protection > Reset > Reset All State Keeping Invite
  3. Start the tunnel.
  4. Once connected change your geolocation.
  5. Make sure you see these as both daily and count:
  • m_mac_netp_tunnel_update_attempt
  • m_mac_netp_tunnel_update_failure (this should include error info)

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@diegoreymendez diegoreymendez changed the title Adds pixels to track attempts to start the VPN controller macOS: Adds pixels to track main VPN funnels Mar 5, 2024
@diegoreymendez diegoreymendez changed the title macOS: Adds pixels to track main VPN funnels Adds pixels to track main VPN funnels Mar 5, 2024
@diegoreymendez diegoreymendez changed the base branch from main to release/1.78.0 March 5, 2024 15:07
@diegoreymendez diegoreymendez force-pushed the diego/vpn-controller-pixels branch from 4ea52ac to 737dd22 Compare March 5, 2024 15:09
@diegoreymendez diegoreymendez marked this pull request as ready for review March 5, 2024 15:16
@diegoreymendez diegoreymendez requested a review from samsymons March 5, 2024 15:18
Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

Looks good, but we'll need to create a BSK hotfix release with those changes before merging this to the release branch.

diegoreymendez added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Mar 7, 2024
Task/Issue URL: https://app.asana.com/0/0/1206737255908394/f

macOS PR: duckduckgo/macos-browser#2304
iOS PR: duckduckgo/iOS#2543

## Description

Add pixels to better track all main VPN funnels.  For BSK this means:
- VPN Tunnel Start
- VPN Tunnel Update (change location, etc)
diegoreymendez added a commit to duckduckgo/iOS that referenced this pull request Mar 7, 2024
Task/Issue URL: https://app.asana.com/0/0/1206737255908394/f

macOS PR: duckduckgo/macos-browser#2304
BSK PR: duckduckgo/BrowserServicesKit#698

## Description

Add pixels to better track all main VPN funnels:
- VPN Controller Start
- VPN Tunnel Start
- VPN Tunnel Update (change location, etc)
@diegoreymendez diegoreymendez merged commit 5838919 into release/1.78.0 Mar 7, 2024
17 checks passed
@diegoreymendez diegoreymendez deleted the diego/vpn-controller-pixels branch March 7, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants