|
| 1 | +# Jetpack iOS Install Drop Investigation - March 2025 |
| 2 | + |
| 3 | +## Executive Summary |
| 4 | + |
| 5 | +Investigation into a significant drop in Jetpack iOS app installs that occurred around March 10-14, 2025. This drop was specific to iOS and did not affect Android installations during the same period. Analysis reveals a potential root cause related to mobile device detection changes in the magic login flow. |
| 6 | + |
| 7 | +## Key Findings |
| 8 | + |
| 9 | +### 1. Timeline and Scope |
| 10 | +- **Affected Period**: March 10-14, 2025 (approximately 4 days after March 10) |
| 11 | +- **Platform Impact**: iOS only (iPhone, iPad) |
| 12 | +- **Android Impact**: No corresponding drop observed during this period |
| 13 | +- **Type**: App install reduction (may be related to web referrals but not confirmed) |
| 14 | + |
| 15 | +### 2. Critical Discovery: Magic Login App Promo Hiding |
| 16 | + |
| 17 | +**PRIMARY SUSPECT**: On March 12, 2025, a commit was made that significantly changed how the Jetpack Mobile App promo is displayed in the magic login flow. |
| 18 | + |
| 19 | +**Commit Details**: |
| 20 | +- **Date**: March 12, 2025 |
| 21 | +- **Commit**: [`8faa70b0f91`](https://github.com/Automattic/wp-calypso/commit/8faa70b0f914f9902f8cca5a982df672857307b9) |
| 22 | +- **Pull Request**: [#101198](https://github.com/Automattic/wp-calypso/pull/101198) |
| 23 | +- **Title**: "Magic login: Hide Jetpack Mobile App promo on desktop / non-mobile UAs" |
| 24 | +- **Author**: Andrew Serong |
| 25 | + |
| 26 | +**Change Summary**: |
| 27 | +The commit modified `/client/login/magic-login/index.jsx` to hide the Jetpack Mobile App promo for non-mobile user agents by introducing new mobile detection logic. |
| 28 | + |
| 29 | +### 3. Technical Analysis of the Change |
| 30 | + |
| 31 | +**Before the change**: |
| 32 | +```jsx |
| 33 | +// App promo was only hidden for A4A users |
| 34 | +const isA4A = query?.redirect_to?.includes( 'agencies.automattic.com/client' ) ?? false; |
| 35 | + |
| 36 | +if ( isA4A ) { |
| 37 | + return null; // Hide app promo |
| 38 | +} |
| 39 | +``` |
| 40 | +
|
| 41 | +**After the change**: |
| 42 | +```jsx |
| 43 | +// Added mobile detection logic |
| 44 | +const { isiPad, isiPod, isiPhone, isAndroid } = userAgent; |
| 45 | +const isMobile = isiPad || isiPod || isiPhone || isAndroid; |
| 46 | +const hideAppPromo = isA4A || ! isMobile; |
| 47 | + |
| 48 | +if ( hideAppPromo ) { |
| 49 | + return null; // Hide app promo |
| 50 | +} |
| 51 | +``` |
| 52 | +
|
| 53 | +### 4. Potential Root Cause: iOS Detection Issues |
| 54 | +
|
| 55 | +**Critical Problem Identified**: The mobile detection logic may have issues specifically with iOS devices: |
| 56 | +
|
| 57 | +1. **Inconsistent Detection Methods**: |
| 58 | + - The magic login flow uses `express-useragent` library properties (`isiPad`, `isiPod`, `isiPhone`) |
| 59 | + - The main app banner component uses direct regex matching: `/iPad|iPod|iPhone/i` |
| 60 | + - This inconsistency could lead to different behavior for the same iOS devices |
| 61 | +
|
| 62 | +2. **iPadOS Detection Issues**: |
| 63 | + - Modern iPads running iPadOS may report desktop Safari user agents when in desktop mode |
| 64 | + - The `express-useragent` library may not correctly identify these as mobile devices |
| 65 | + - This could cause the app promo to be hidden on iPads, reducing iOS install referrals |
| 66 | +
|
| 67 | +3. **User Agent Parsing Reliability**: |
| 68 | + - The change relies on `express-useragent` parsing which may have edge cases |
| 69 | + - iOS user agent strings have become more complex with recent iOS versions |
| 70 | +
|
| 71 | +### 5. Impact Assessment |
| 72 | +
|
| 73 | +**Magic Login Flow Importance**: |
| 74 | +- Magic login is a significant entry point for WordPress.com users |
| 75 | +- Users accessing this flow are actively engaging with authentication, making them prime candidates for app adoption |
| 76 | +- Hiding the app promo from iOS users during login would directly impact iOS install rates |
| 77 | +
|
| 78 | +**Why iOS-Specific Impact**: |
| 79 | +- The detection logic combines `isiPad || isiPod || isiPhone || isAndroid` |
| 80 | +- If iOS detection fails but Android detection works, only iOS users would lose the app promo |
| 81 | +- This explains why Android installs weren't affected during the same period |
| 82 | +
|
| 83 | +### 6. Supporting Evidence |
| 84 | +
|
| 85 | +**Timing Correlation**: |
| 86 | +- March 12, 2025 commit falls within the March 10-14 problem window |
| 87 | +- The change was specifically targeted at mobile app promotion visibility |
| 88 | +- No other significant mobile-related changes found in this timeframe |
| 89 | +
|
| 90 | +**Other Changes During March 10-14**: |
| 91 | +- [`dd97115a0e9`](https://github.com/Automattic/wp-calypso/commit/dd97115a0e9) - Fix mobile button alignment ([PR #101276](https://github.com/Automattic/wp-calypso/pull/101276)) |
| 92 | +- [`21633d1325c`](https://github.com/Automattic/wp-calypso/commit/21633d1325c) - Fix Add Sites card for mobile ([PR #101260](https://github.com/Automattic/wp-calypso/pull/101260)) |
| 93 | +- [`057cc985f7e`](https://github.com/Automattic/wp-calypso/commit/057cc985f7e) - Remove business upsell nudge styles ([PR #101049](https://github.com/Automattic/wp-calypso/pull/101049)) |
| 94 | +
|
| 95 | +## Technical Deep Dive |
| 96 | +
|
| 97 | +### Mobile Detection Inconsistencies Found |
| 98 | +
|
| 99 | +1. **App Banner Component** (`/client/blocks/app-banner/index.jsx`): |
| 100 | + ```jsx |
| 101 | + const IOS_REGEX = /iPad|iPod|iPhone/i; |
| 102 | + isiOS() { |
| 103 | + return IOS_REGEX.test( this.props.userAgent ); |
| 104 | + } |
| 105 | + ``` |
| 106 | +
|
| 107 | +2. **Magic Login Component** (`/client/login/magic-login/index.jsx`): |
| 108 | + ```jsx |
| 109 | + const { isiPad, isiPod, isiPhone, isAndroid } = userAgent; |
| 110 | + const isMobile = isiPad || isiPod || isiPhone || isAndroid; |
| 111 | + ``` |
| 112 | +
|
| 113 | +3. **User Agent Library** (`/client/lib/user-agent/index.js`): |
| 114 | + ```jsx |
| 115 | + export default UserAgent.parse( typeof window !== 'undefined' ? window.navigator.userAgent : '' ); |
| 116 | + ``` |
| 117 | +
|
| 118 | +**The Problem**: Different detection methods could yield different results for the same iOS device, especially with: |
| 119 | +- iPadOS devices in desktop mode |
| 120 | +- Newer iOS versions with modified user agent strings |
| 121 | +- Safari's privacy features affecting user agent reporting |
| 122 | +
|
| 123 | +## Dependencies and External Factors |
| 124 | +
|
| 125 | +### 1. Express-UserAgent Library |
| 126 | +- **Dependency**: The magic login change relies on `express-useragent` parsing accuracy |
| 127 | +- **Risk**: This library may not be up-to-date with latest iOS user agent patterns |
| 128 | +- **Impact**: Could cause false negatives for iOS device detection |
| 129 | +
|
| 130 | +### 2. iOS Platform Changes |
| 131 | +- **iPadOS Desktop Mode**: iPads can present as desktop Safari, affecting detection |
| 132 | +- **Privacy Features**: iOS privacy enhancements may modify user agent strings |
| 133 | +- **Safari Updates**: Changes in Safari user agent reporting could affect detection |
| 134 | +
|
| 135 | +### 3. User Agent Evolution |
| 136 | +- iOS user agents have become more complex and privacy-focused |
| 137 | +- Detection libraries may lag behind Apple's changes |
| 138 | +- Different detection methods may have different update cycles |
| 139 | +
|
| 140 | +## Recommendations |
| 141 | +
|
| 142 | +### **URGENT - Immediate Actions** |
| 143 | +
|
| 144 | +1. **Verify iOS Detection Accuracy**: |
| 145 | + - Test the magic login flow on various iOS devices (iPhone, iPad in mobile and desktop modes) |
| 146 | + - Check if the app promo appears correctly for iOS users |
| 147 | + - Compare results with the main app banner behavior |
| 148 | +
|
| 149 | +2. **Quick Fix Options**: |
| 150 | + - **Option A**: Revert the March 12 change temporarily to restore previous behavior |
| 151 | + - **Option B**: Fix the iOS detection logic to use the same method as the app banner |
| 152 | + - **Option C**: Add logging to track detection accuracy and app promo display rates |
| 153 | +
|
| 154 | +3. **Emergency Rollback Plan**: |
| 155 | + - If confirmed as the cause, revert commit [`8faa70b0f91`](https://github.com/Automattic/wp-calypso/commit/8faa70b0f914f9902f8cca5a982df672857307b9) |
| 156 | + - Deploy hotfix within hours to restore iOS install referrals |
| 157 | +
|
| 158 | +### **Investigation Steps** |
| 159 | +
|
| 160 | +1. **Data Correlation**: |
| 161 | + - Check magic login usage statistics before/after March 12 |
| 162 | + - Compare app promo impression rates for iOS vs Android |
| 163 | + - Analyze user agent logs to identify detection failures |
| 164 | +
|
| 165 | +2. **Device Testing**: |
| 166 | + - Test on iPhone (various iOS versions) |
| 167 | + - Test on iPad in both mobile and desktop modes |
| 168 | + - Test on iPod Touch if still supported |
| 169 | + - Compare with Android devices for control |
| 170 | +
|
| 171 | +3. **Code Review**: |
| 172 | + - Interview Andrew Serong about the motivation for the change |
| 173 | + - Review if there were specific user agent issues that prompted this fix |
| 174 | + - Check for any reported bugs related to desktop app promo display |
| 175 | +
|
| 176 | +### **Long-term Solutions** |
| 177 | +
|
| 178 | +1. **Standardize Detection Logic**: |
| 179 | + - Create a unified mobile detection utility used across all components |
| 180 | + - Ensure consistent iOS detection across the entire application |
| 181 | + - Regular testing with latest iOS versions and user agent changes |
| 182 | +
|
| 183 | +2. **Enhanced Monitoring**: |
| 184 | + - Add specific tracking for app promo display rates by platform |
| 185 | + - Monitor iOS detection accuracy over time |
| 186 | + - Alert on sudden drops in mobile detection rates |
| 187 | +
|
| 188 | +3. **Improved Testing**: |
| 189 | + - Add automated tests for mobile detection across different user agents |
| 190 | + - Include regression tests for iOS detection specifically |
| 191 | + - Test with realistic iOS user agent strings including iPadOS variations |
| 192 | +
|
| 193 | +## Alternative Hypotheses |
| 194 | +
|
| 195 | +While the magic login change is the primary suspect, other possibilities include: |
| 196 | +
|
| 197 | +1. **iOS Platform Changes**: Apple may have changed something in iOS that affects web-to-app attribution |
| 198 | +2. **App Store Algorithm**: Changes in App Store search or recommendation algorithms |
| 199 | +3. **Marketing Campaign Changes**: Reduction in iOS-specific marketing efforts |
| 200 | +4. **External Website Changes**: Partner sites or referral sources may have changed their iOS linking |
| 201 | +
|
| 202 | +## Conclusion |
| 203 | +
|
| 204 | +**LIKELY ROOT CAUSE IDENTIFIED**: The March 12, 2025 commit that modified mobile detection in the magic login flow appears to be the most probable cause of the iOS install drop. |
| 205 | +
|
| 206 | +**Key Evidence**: |
| 207 | +- Perfect timing correlation (March 12 within March 10-14 window) |
| 208 | +- iOS-specific impact matches the platform-specific install drop |
| 209 | +- Technical change directly affects iOS app promotion visibility |
| 210 | +- Inconsistent detection methods between components suggest reliability issues |
| 211 | +
|
| 212 | +**Confidence Level**: HIGH - The technical change, timing, and platform-specific impact strongly suggest this is the root cause. |
| 213 | +
|
| 214 | +**Recommended Action**: Immediate investigation of iOS detection accuracy in the magic login flow, with potential rollback if confirmed as the cause. |
| 215 | +
|
| 216 | +**Impact**: If confirmed and fixed, this should restore the iOS install referral rates to pre-March 12 levels. |
0 commit comments