Skip to content

Commit ff7f715

Browse files
committed
Merge branch 'trunk' into issue/8213-analytics-empty-state
2 parents c2b646e + 27d3cda commit ff7f715

File tree

64 files changed

+1729
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1729
-271
lines changed

Hardware/Hardware/CardReader/StripeCardReader/CardReaderDiscoveryMethod.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import StripeTerminal
44

55
public enum CardReaderDiscoveryMethod {
66
case localMobile
7-
case bluetoothProximity
7+
case bluetoothScan
88

99
func toStripe() -> DiscoveryMethod {
1010
switch self {
1111
case .localMobile:
1212
return .localMobile
13-
case .bluetoothProximity:
14-
return .bluetoothProximity
13+
case .bluetoothScan:
14+
return .bluetoothScan
1515
}
1616
}
1717
}

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ target 'WooCommerce' do
7171
pod 'Gridicons', '~> 1.2.0'
7272

7373
# To allow pod to pick up beta versions use -beta. E.g., 1.1.7-beta.1
74-
pod 'WordPressAuthenticator', '~> 4.2.0'
75-
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
74+
pod 'WordPressAuthenticator', '~> 4.3.0-beta.1'
75+
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => ''
7676
# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => ''
7777
# pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS'
7878

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PODS:
4242
- WordPress-Aztec-iOS (1.11.0)
4343
- WordPress-Editor-iOS (1.11.0):
4444
- WordPress-Aztec-iOS (= 1.11.0)
45-
- WordPressAuthenticator (4.2.0):
45+
- WordPressAuthenticator (4.3.0-beta.1):
4646
- CocoaLumberjack (~> 3.5)
4747
- GoogleSignIn (~> 6.0.1)
4848
- Gridicons (~> 1.0)
@@ -91,7 +91,7 @@ DEPENDENCIES:
9191
- Sourcery (~> 1.0.3)
9292
- StripeTerminal (~> 2.14)
9393
- WordPress-Editor-iOS (~> 1.11.0)
94-
- WordPressAuthenticator (~> 4.2.0)
94+
- WordPressAuthenticator (~> 4.3.0-beta.1)
9595
- WordPressKit (~> 4.49.0)
9696
- WordPressShared (~> 1.15)
9797
- WordPressUI (~> 1.12.5)
@@ -162,7 +162,7 @@ SPEC CHECKSUMS:
162162
UIDeviceIdentifier: af4e11e25a2ea670078e2bd677bb0e8144f9f063
163163
WordPress-Aztec-iOS: 050b34d4c3adfb7c60363849049b13d60683b348
164164
WordPress-Editor-iOS: 304098424f1051cb271546c99f906aac296b1b81
165-
WordPressAuthenticator: 27178591a805804bd27959f1f76ddcb94605916c
165+
WordPressAuthenticator: f886178b7202cfb8adfd834fb6391b7970d18871
166166
WordPressKit: 96deb6ba37ea5eaec4ddcaa53eca04d653246152
167167
WordPressShared: 5477f179c7fe03b5d574f91adda66f67d131827e
168168
WordPressUI: c5be816f6c7b3392224ac21de9e521e89fa108ac
@@ -178,6 +178,6 @@ SPEC CHECKSUMS:
178178
ZendeskSupportProvidersSDK: 2bdf8544f7cd0fd4c002546f5704b813845beb2a
179179
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
180180

181-
PODFILE CHECKSUM: 8b243f1ea76d4db3aa638b50ef0d516185d01c2c
181+
PODFILE CHECKSUM: b5975e437e8925c28bb2d91af5f3e557e82ae34a
182182

183183
COCOAPODS: 1.11.3

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Please, remember to not add this information on your commits and PRs.
103103
- [Tracking Events](docs/tracking-events.md)
104104
- [Custom Properties](docs/tracking-events.md#custom-properties)
105105
- Quality & Testing
106-
- [UI Tests](docs/UI-TESTS.md)
106+
- [UI Tests](WooCommerce/WooCommerceUITests/README.md)
107107
- [Testing Card Present Payments](docs/stripe-tests.md)
108108
- [Beta Testing](https://woocommercehalo.wordpress.com/setup/join-ios-beta/)
109109
- [Issue Triage](docs/issue-triage.md)

RELEASE-NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
11.5
44
-----
55
- [*] Account deletion is now supported for all users in settings or in the empty stores screen. [https://github.com/woocommerce/woocommerce-ios/pull/8179]
6+
- [*] In-Person Payments: We removed any references to Simple Payments from Orders, and the red badge from the Menu tab and Menu Payments icon announcing the new Payments section. [https://github.com/woocommerce/woocommerce-ios/pull/8183]
67

78
11.4
89
-----
9-
- [*] In-Person Payments: We removed any references to Simple Payments from Orders, and the red badge from the Menu tab and Menu Payments icon announcing the new Payments section. [https://github.com/woocommerce/woocommerce-ios/pull/8183]
1010
- [*] Add System Status Report to ZenDesk support requests. [https://github.com/woocommerce/woocommerce-ios/pull/8171]
1111

1212

WooCommerce/Classes/Analytics/WooAnalyticsEvent+StoreCreation.swift

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ extension WooAnalyticsEvent {
77
static let source = "source"
88
static let url = "url"
99
static let errorType = "error_type"
10+
static let flow = "flow"
11+
static let step = "step"
1012
}
1113

1214
/// Tracked when the user taps on the CTA in store picker (logged in to WPCOM) to create a store.
@@ -16,22 +18,40 @@ extension WooAnalyticsEvent {
1618
}
1719

1820
/// Tracked when a site is created from the store creation flow.
19-
static func siteCreated(source: Source, siteURL: String) -> WooAnalyticsEvent {
21+
static func siteCreated(source: Source, siteURL: String, flow: Flow) -> WooAnalyticsEvent {
2022
WooAnalyticsEvent(statName: .siteCreated,
21-
properties: [Key.source: source.rawValue, Key.url: siteURL])
23+
properties: [Key.source: source.rawValue,
24+
Key.url: siteURL,
25+
Key.flow: flow.rawValue])
2226
}
2327

2428
/// Tracked when site creation fails.
25-
static func siteCreationFailed(source: Source, error: Error) -> WooAnalyticsEvent {
29+
static func siteCreationFailed(source: Source, error: Error, flow: Flow) -> WooAnalyticsEvent {
2630
WooAnalyticsEvent(statName: .siteCreationFailed,
27-
properties: [Key.source: source.rawValue],
31+
properties: [Key.source: source.rawValue, Key.flow: flow.rawValue],
2832
error: error)
2933
}
3034

3135
/// Tracked when the user dismisses the store creation flow before the flow is complete.
32-
static func siteCreationDismissed(source: Source) -> WooAnalyticsEvent {
36+
static func siteCreationDismissed(source: Source, flow: Flow) -> WooAnalyticsEvent {
3337
WooAnalyticsEvent(statName: .siteCreationDismissed,
34-
properties: [Key.source: source.rawValue])
38+
properties: [Key.source: source.rawValue, Key.flow: flow.rawValue])
39+
}
40+
41+
/// Tracked when the user reaches each step of the store creation flow.
42+
static func siteCreationStep(step: Step) -> WooAnalyticsEvent {
43+
WooAnalyticsEvent(statName: .siteCreationStep,
44+
properties: [Key.step: step.rawValue])
45+
}
46+
47+
/// Tracked clicking on “Store Preview” button after a site is created successfully.
48+
static func siteCreationSitePreviewed() -> WooAnalyticsEvent {
49+
WooAnalyticsEvent(statName: .siteCreationSitePreviewed, properties: [:])
50+
}
51+
52+
/// Tracked when tapping on the “Manage my store” button on the store creation success screen.
53+
static func siteCreationManageStoreTapped() -> WooAnalyticsEvent {
54+
WooAnalyticsEvent(statName: .siteCreationManageStoreTapped, properties: [:])
3555
}
3656

3757
/// Tracked when the user taps on the CTA in login prologue (logged out) to create a store.
@@ -84,6 +104,22 @@ extension WooAnalyticsEvent.StoreCreation {
84104
case storePicker = "store_picker"
85105
case loginEmailError = "login_email_error"
86106
}
107+
108+
/// The implementation of store creation flow - native (M2) or web (M1).
109+
enum Flow: String {
110+
case native = "native"
111+
case web = "web"
112+
}
113+
114+
/// Steps of the native store creation flow.
115+
enum Step: String {
116+
case storeName = "store_name"
117+
case domainPicker = "domain_picker"
118+
case storeSummary = "store_summary"
119+
case planPurchase = "plan_purchase"
120+
case webCheckout = "web_checkout"
121+
case storeInstallation = "store_installation"
122+
}
87123
}
88124

89125
private extension CreateAccountError {

WooCommerce/Classes/Analytics/WooAnalyticsStat.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public enum WooAnalyticsStat: String {
159159
case sitePickerContinueTapped = "site_picker_continue_tapped"
160160
case sitePickerStoresShown = "site_picker_stores_shown"
161161
case sitePickerHelpButtonTapped = "site_picker_help_button_tapped"
162+
case sitePickerLogoutButtonTapped = "site_picker_logout_tapped"
162163
case sitePickerNonWooSiteTapped = "site_picker_non_woo_site_tapped"
163164
case sitePickerSiteDiscovery = "site_picker_site_discovery"
164165
case sitePickerNewToWooTapped = "site_picker_new_to_woo_tapped"
@@ -171,6 +172,9 @@ public enum WooAnalyticsStat: String {
171172
case siteCreated = "login_woocommerce_site_created"
172173
case siteCreationFailed = "site_creation_failed"
173174
case siteCreationDismissed = "site_creation_dismissed"
175+
case siteCreationStep = "site_creation_step"
176+
case siteCreationSitePreviewed = "site_creation_site_previewed"
177+
case siteCreationManageStoreTapped = "site_creation_store_management_opened"
174178
case loginPrologueCreateSiteTapped = "login_prologue_create_site_tapped"
175179
case signupFormLoginTapped = "signup_login_button_tapped"
176180
case signupSubmitted = "signup_submitted"

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class AuthenticationManager: Authentication {
6060
let isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen = ServiceLocator.featureFlagService.isFeatureFlagEnabled(.loginMagicLinkEmphasisM2)
6161
let isSimplifiedLoginI1Enabled = ABTest.abTestLoginWithWPComOnly.variation != .control
6262
let isStoreCreationMVPEnabled = ServiceLocator.featureFlagService.isFeatureFlagEnabled(.storeCreationMVP)
63+
let isNativeJetpackSetupEnabled = ABTest.nativeJetpackSetupFlow.variation != .control
6364
let configuration = WordPressAuthenticatorConfiguration(wpcomClientId: ApiCredentials.dotcomAppId,
6465
wpcomSecret: ApiCredentials.dotcomSecret,
6566
wpcomScheme: ApiCredentials.dotcomAuthScheme,
@@ -86,7 +87,8 @@ class AuthenticationManager: Authentication {
8687
enableSocialLogin: !isSimplifiedLoginI1Enabled,
8788
emphasizeEmailForWPComPassword: true,
8889
wpcomPasswordInstructions:
89-
AuthenticationConstants.wpcomPasswordInstructions)
90+
AuthenticationConstants.wpcomPasswordInstructions,
91+
skipXMLRPCCheckForSiteDiscovery: isNativeJetpackSetupEnabled)
9092

9193
let systemGray3LightModeColor = UIColor(red: 199/255.0, green: 199/255.0, blue: 204/255.0, alpha: 1)
9294
let systemLabelLightModeColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1)

WooCommerce/Classes/Authentication/Epilogue/StorePickerViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ private extension StorePickerViewController {
507507
return
508508
}
509509

510+
ServiceLocator.analytics.track(.sitePickerLogoutButtonTapped)
511+
510512
delegate?.restartAuthentication()
511513
}
512514

WooCommerce/Classes/Authentication/Jetpack Setup/LoginJetpackSetupCoordinator.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ final class LoginJetpackSetupCoordinator: Coordinator {
3232
let siteCredentialUI = SiteCredentialLoginHostingViewController(
3333
siteURL: siteURL,
3434
connectionOnly: connectionOnly,
35-
onLoginSuccess: { [weak self] xmlrpc in
36-
self?.showSetupSteps(xmlrpc: xmlrpc)
35+
onLoginSuccess: { [weak self] in
36+
self?.showSetupSteps()
3737
})
3838
navigationController.present(UINavigationController(rootViewController: siteCredentialUI), animated: true)
3939
}
@@ -42,13 +42,13 @@ final class LoginJetpackSetupCoordinator: Coordinator {
4242
// MARK: Private helpers
4343
//
4444
private extension LoginJetpackSetupCoordinator {
45-
func showSetupSteps(xmlrpc: String) {
45+
func showSetupSteps() {
4646
let setupUI = LoginJetpackSetupHostingController(siteURL: siteURL, connectionOnly: connectionOnly, onStoreNavigation: { [weak self] connectedEmail in
4747
guard let self, let email = connectedEmail else { return }
4848
if email != self.stores.sessionManager.defaultAccount?.email {
4949
// if the user authorized Jetpack with a different account, support them to log in with that account.
5050
self.analytics.track(.loginJetpackSetupAuthorizedUsingDifferentWPCOMAccount)
51-
self.showVerifyWPComAccount(email: email, xmlrpc: xmlrpc)
51+
self.showVerifyWPComAccount(email: email)
5252
} else {
5353
self.showStorePickerForLogin()
5454
}
@@ -61,10 +61,10 @@ private extension LoginJetpackSetupCoordinator {
6161
contentNavigationController.setViewControllers([setupUI], animated: true)
6262
}
6363

64-
func showVerifyWPComAccount(email: String, xmlrpc: String) {
64+
func showVerifyWPComAccount(email: String) {
6565
WordPressAuthenticator.showVerifyEmailForWPCom(
6666
from: navigationController.presentedViewController ?? navigationController,
67-
xmlrpc: xmlrpc,
67+
xmlrpc: "",
6868
connectedEmail: email,
6969
siteURL: siteURL
7070
)

0 commit comments

Comments
 (0)