-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[NT-482] Pledge tracking events #929
Conversation
…pledge-tracking-events
…pledge-tracking-events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review with Nino
.observeValues { | ||
AppEnvironment.current.koala.trackAddNewCardButtonClicked( | ||
project: $0, pledgeAmount: $1?.amount ?? 0.0 | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this so it does not emit when user is changing payment method.
XCTAssertEqual([], self.trackingClient.events) | ||
|
||
self.vm.inputs.addNewCardTapped(with: .pledge) | ||
self.goToAddCardIntent.assertValues([.pledge]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this, we are only testing the event
let projectAndBacking = Signal.combineLatest(project, backing) | ||
|
||
// Tracking | ||
projectAndBacking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a space here
func testTrackingEvents_PledgeScreenViewed() { | ||
self.vm.inputs.configureWith(project: .template, reward: .template, refTag: nil, context: .pledge) | ||
|
||
self.vm.inputs.viewDidLoad() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test that event does not emit
|
||
func testTrackingEvents_PledgeButtonClicked() { | ||
self.vm.inputs.configureWith(project: .template, reward: .template, refTag: nil, context: .pledge) | ||
self.vm.inputs.viewDidLoad() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the comments of our pairing session here, @cdolm92 🎉
📲 What
Improvements in monitoring user behavior for v1 checkout. This tracks events in the pledge screen.
🤔 Why
We now track the following events on the pledge screen:
Pledge Screen Viewed
Pledge Button Clicked
Add New Card Button Clicked
✅ Acceptance criteria
Pledge Screen Viewed
: Navigate to a live/non-backed project, tapBack this project
-> select a reward, pledge screen should load and you should the event emit.Pledge Button Clicked
: Navigate to a live/non-backed project, tapBack this project
-> select a reward, and then tapPledge
. You should see the event emit.Pledge Button Clicked
: Navigate to a live/non-backed project, tapBack this project
-> select a reward, and then tapAdd New Card
. Add New Card should load and you should see event emit.