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

[NT-482] Pledge tracking events #929

Merged
merged 10 commits into from
Nov 6, 2019
Merged

[NT-482] Pledge tracking events #929

merged 10 commits into from
Nov 6, 2019

Conversation

cdolm92
Copy link
Contributor

@cdolm92 cdolm92 commented Nov 4, 2019

πŸ“² 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

  • To test Pledge Screen Viewed: Navigate to a live/non-backed project, tap Back this project -> select a reward, pledge screen should load and you should the event emit.
  • To test Pledge Button Clicked: Navigate to a live/non-backed project, tap Back this project -> select a reward, and then tap Pledge. You should see the event emit.
  • To test Pledge Button Clicked: Navigate to a live/non-backed project, tap Back this project -> select a reward, and then tap Add New Card. Add New Card should load and you should see event emit.

Copy link
Contributor Author

@cdolm92 cdolm92 left a 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
)
Copy link
Contributor Author

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])
Copy link
Contributor Author

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
Copy link
Contributor Author

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()
Copy link
Contributor Author

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()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

add spacing

Copy link
Contributor

@Scollaco Scollaco left a 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 πŸŽ‰

@cdolm92 cdolm92 merged commit 3506754 into master Nov 6, 2019
@cdolm92 cdolm92 deleted the pledge-tracking-events branch November 6, 2019 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants