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

Use configuration flag to log custom step event for GetStartedViewController #724

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ _None._
### Bug Fixes

- Fix unresponsive issue in Onboading Questions screen. [#719]
- Use configuration flag to log custom `step` event for `GetStartedViewController`. [#724]

### Internal Changes

Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PODS:
- SVProgressHUD (2.2.5)
- SwiftLint (0.49.1)
- UIDeviceIdentifier (2.2.0)
- WordPressAuthenticator (5.0.0):
- WordPressAuthenticator (5.1.0-beta.1):
- GoogleSignIn (~> 6.0.1)
- Gridicons (~> 1.0)
- "NSURL+IDN (= 0.4)"
Expand Down Expand Up @@ -94,7 +94,7 @@ SPEC CHECKSUMS:
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
SwiftLint: 32ee33ded0636d0905ef6911b2b67bbaeeedafa5
UIDeviceIdentifier: f33af270ba9045ea18b31d9aab88e42a0082ea67
WordPressAuthenticator: e4fbd4ef3b266d4efad59a28db1dd1c626fc3286
WordPressAuthenticator: 95f698805ebbbe86c5721ce244e1302ea810326b
WordPressKit: 202f529323b079a344f7bc1493b7ebebfd9ed4b5
WordPressShared: 04403b43f821c4ed2b84a2112ef9f64f1e7cdceb
WordPressUI: 1cf47a3b78154faf69caa18569ee7ece1e510fa0
Expand Down
2 changes: 1 addition & 1 deletion WordPressAuthenticator.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pod::Spec.new do |s|
s.name = 'WordPressAuthenticator'
s.version = '5.0.0'
s.version = '5.1.0-beta.1'

s.summary = 'WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.'
s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ public struct WordPressAuthenticatorConfiguration {
///
let skipXMLRPCCheckForSiteDiscovery: Bool

/// Used to determine the `step` value for `unified_login_step` analytics event in `GetStartedViewController`
///
/// - If disabled `start` will be used as `step` value
/// - Disabled by default
/// - If enabled, `enter_email_address` will be used as `step` value
/// - Custom step value is used because `start` is used in other VCs as well, which doesn't allow us to differentiate between screens.
/// - i.e. Some screens have the same `step` and `flow` value. `GetStartedViewController` and `SiteAddressViewController` for example.
///
let useEnterEmailAddressAsStepValueForGetStartedVC: Bool

/// Designated Initializer
///
public init (wpcomClientId: String,
Expand Down Expand Up @@ -166,7 +176,8 @@ public struct WordPressAuthenticatorConfiguration {
enableSocialLogin: Bool = false,
emphasizeEmailForWPComPassword: Bool = false,
wpcomPasswordInstructions: String? = nil,
skipXMLRPCCheckForSiteDiscovery: Bool = false) {
skipXMLRPCCheckForSiteDiscovery: Bool = false,
useEnterEmailAddressAsStepValueForGetStartedVC: Bool = false) {

self.wpcomClientId = wpcomClientId
self.wpcomSecret = wpcomSecret
Expand Down Expand Up @@ -197,5 +208,6 @@ public struct WordPressAuthenticatorConfiguration {
self.emphasizeEmailForWPComPassword = emphasizeEmailForWPComPassword
self.wpcomPasswordInstructions = wpcomPasswordInstructions
self.skipXMLRPCCheckForSiteDiscovery = skipXMLRPCCheckForSiteDiscovery
self.useEnterEmailAddressAsStepValueForGetStartedVC = useEnterEmailAddressAsStepValueForGetStartedVC
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,11 @@ private extension GetStartedViewController {
tracker.set(flow: .wpCom)
}

let stepValue: AuthenticatorAnalyticsTracker.Step = configuration.useEnterEmailAddressAsStepValueForGetStartedVC ? .enterEmailAddress : .start
if isMovingToParent {
tracker.track(step: .enterEmailAddress)
tracker.track(step: stepValue)
} else {
tracker.set(step: .enterEmailAddress)
tracker.set(step: stepValue)
}
}
}
Expand Down