Skip to content

Conversation

@hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Oct 30, 2025

Closes WOOMOB-1010

Description

For historical reasons, we were using different tracking plan for the Jetpack Setup depending on how it was opened:

  • If it was accessed from the site picker (either during login or not), we were using events starting with login_jetpack_setup
  • For Application Passwords users, the tracking plan uses a smaller number of events (most actions are tracked using jetpack_setup_flow), and we use properties to add more details

With the last project to integrate the Jetpack Connection API, we decided to unify the tracking between the two flows, and this was implemented in iOS in this PR woocommerce/woocommerce-ios#15999, this Android PR handles the same change.

Test Steps

A good code review is better for this PR just to confirm I did the right action for all the locations.

For testing, please follow this:

  1. Prepare a site without Jetpack (a Jurassic Ninja site that has WooCommerce will work for this)
  2. Sign in using WordPress.com account (to a different site)
  3. Open the site picker.
  4. Tap on "Connect another store"
  5. Follow the steps to Install Jetpack and connect your account to the site prepared in step 1.
  6. Check the logs, you'll notice a tracking like this for Jetpack installation:
Tracked: woocommerceandroid_login_jetpack_setup_button_tapped, Properties: {...}
Tracked: woocommerceandroid_jetpack_setup_flow, Properties: {"step":"installation","connection_type":"native"...}
Tracked: woocommerceandroid_jetpack_setup_flow, Properties: {"step":"connection","connection_type":"native"...}
Tracked: woocommerceandroid_jetpack_setup_flow, Properties: {"step":"all_done","connection_type":"native"...}
Tracked: woocommerceandroid_jetpack_setup_completed, Properties: {...}
Tracked: woocommerceandroid_jetpack_setup_flow, Properties: {"step":"all_done","tap":"go_to_store"...}
Tracked: woocommerceandroid_jetpack_setup_synchronization_completed, Properties: {...}
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@hichamboushaba hichamboushaba added category: tracks Related to analytics, including Tracks Events. feature: login Related to any part of the log in or sign in flow, or authentication. labels Oct 30, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 30, 2025

1 Warning
⚠️ This PR is assigned to the milestone 23.6. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.
1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 30, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit895f0b1
Direct Downloadwoocommerce-wear-prototype-build-pr14868-895f0b1.apk

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-1010-update-jetpack-setup-tracking branch from 28ddfe0 to 98ab309 Compare October 30, 2025 17:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates Jetpack activation analytics by removing feature-flag-based tracking and standardizing on a unified JETPACK_SETUP_FLOW event pattern. The changes remove the useApplicationPasswords conditional logic that maintained dual analytics systems.

Key changes:

  • Unified all Jetpack setup analytics to use JETPACK_SETUP_FLOW event with consistent property keys (KEY_STEP, KEY_TAP, KEY_FAILURE)
  • Removed 18 deprecated LOGIN_JETPACK_* analytics events
  • Updated JetpackActivationStartViewModel to use the new analytics structure with a new VALUE_JETPACK_SETUP_TAP_CONTINUE_SETUP constant

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
JetpackActivationMainViewModel.kt Removed conditional analytics logic based on useApplicationPasswords flag; consolidated all tracking to use trackSetupFlow() method
JetpackActivationStartViewModel.kt Updated analytics events to use JETPACK_SETUP_FLOW pattern with appropriate step and tap properties
JetpackActivationRepository.kt Removed direct analytics tracking and unused AnalyticsTrackerWrapper dependency
AnalyticsTracker.kt Added new VALUE_JETPACK_SETUP_TAP_CONTINUE_SETUP constant for continue action tracking
AnalyticsEvent.kt Removed 18 deprecated LOGIN_JETPACK_* analytics event enum values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hichamboushaba hichamboushaba marked this pull request as ready for review October 30, 2025 17:40
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 30, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit895f0b1
Direct Downloadwoocommerce-prototype-build-pr14868-895f0b1.apk

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-1010-update-jetpack-setup-tracking branch from d6b6ac7 to 895f0b1 Compare October 30, 2025 18:23
@irfano irfano self-assigned this Oct 31, 2025
Copy link
Contributor

@irfano irfano left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected. 👍🏻

@irfano irfano added this to the 23.6 milestone Oct 31, 2025
@irfano irfano enabled auto-merge October 31, 2025 09:42
@irfano irfano merged commit a514f29 into trunk Oct 31, 2025
20 checks passed
@irfano irfano deleted the issue/WOOMOB-1010-update-jetpack-setup-tracking branch October 31, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events. feature: login Related to any part of the log in or sign in flow, or authentication.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants